I would like to concatenate a string within a ternary operator in EL(Expression Language).
Suppose there is a variable named value. If it's empty, I want to use some default text. Otherwise, I need to append it with some static text.
${(empty value)? "none" : value + " enabled"}
This will not compile however. What would be a correct way to write this? Or is this even possible?
With EL 2 you can do the following:
#{'this'.concat(' is').concat(' a').concat(' test!')}