What is the correct way of doing conditional output?
This
<h:outputText value="#{payee.discriminatorValue=='P' ? payee.firstName:' '}"/>
works , and yet this
<h:outputText value="#{payee.discriminatorValue=='P' ? ' ':payee.orgRegistrationNumber}"/>
fails with the following parse error :
SEVERE: Error Rendering View[/claimantresult.xhtml]
com.sun.facelets.tag.TagAttributeException: /claimantresult.xhtml @158,103 value="#{payee.discriminatorValue=='P' ? ' ' :payee.orgRegistrationNumber}" Error Parsing: #{payee.discriminatorValue=='P' ? ' ' :payee.orgRegistrationNumber}
at com.sun.facelets.tag.TagAttribute.getValueExpression(TagAttribute.java:259)
.............
............
....
Caused by: javax.el.ELException: Error Parsing: #{payee.discriminatorValue=='P' ? ' ' :payee.orgRegistrationNumber}
at com.sun.el.lang.ExpressionBuilder.createNodeInternal(ExpressionBuilder.java:160)
at com.sun.el.lang.ExpressionBuilder.build(ExpressionBuilder.java:177)
at com.sun.el.lang.ExpressionBuilder.createValueExpression(ExpressionBuilder.java:221)
at com.sun.el.ExpressionFactoryImpl.createValueExpression(ExpressionFactoryImpl.java:81)
at org.jboss.seam.ui.facelet.SeamExpressionFactory.createValueExpression(SeamExpressionFactory.java:107)
at com.sun.facelets.tag.TagAttribute.getValueExpression(TagAttribute.java:256)
... 61 more
Caused by: com.sun.el.parser.ParseException: Encountered ":payee" at line 1, column 39.
Was expecting one of:
"." ...
"[" ...
":" ...
">" ..

