This page covers the syntax of the expression language (EL) used within Phase pages.
Within the context of an EL expression, it is possible to use the ternary operator (? :) (also known as the conditional operator) to avoid having to use the rather verbose choose tag set. The benefit of doing this with the EL syntax is to take advantage of the object dereferencing, the variable context and addition shorthand. Several examples follow:
You ${empty name ? 'did' : 'did not'} specify a name.
<tr class="${loopStatus.count % 2 ? 'even' : 'odd'}row">
...
</tr>
Be sure to note that native arrays are treated the same as HashMaps, so to output the value of a key, either foo.bar or foo[bar] can be used in Phase. Java, by comparison, can only do hashmaps as objects, so the syntax is more restrictive.