I am trying to write a expression with the unified expression language in JSF that states that, if an image is not empty, then use it otherwise use a default one.
#{not empty image ? image : #{bean.directory}image.jpg}
The problem is the default one can be accessed only by calling a certain function “#{bean.directory}” to retrieve the directory. I am getting ERROR PARSING.
Any idea how to resolve this?
Your mistake is, that you nesting expressions.
This is not supported.
Related to your expression:
Another example: