cancel
Showing results for 
Search instead for 
Did you mean: 

<ELSE> tags within evaluators

matasierra
Champ in-the-making
Champ in-the-making
Hello,

I'm using an evaluator


  <a:stringEqualsEvaluator value="#{bean.name}" condition="Something">
     <h:outputText value="strings are equal!" />
  </a:stringEqualsEvaluator>

Is there a way to specify something to be rendered if true (strings are equal), AND have something else rendered when false (strings are different) ?

Thank you in advance
3 REPLIES 3

kevinr
Star Contributor
Star Contributor
You can wrap the tags in a further evaluator:

<a:stringEqualsEvaluator value="#{bean.name}" condition="SomethingElse">
  <a:stringEqualsEvaluator value="#{bean.name}" condition="Something">
     <h:outputText value="strings are equal!" />
  </a:stringEqualsEvaluator>
</a:stringEqualsEvaluator>

matasierra
Champ in-the-making
Champ in-the-making
Thanks kevin, but what I actually need is some way to render output when the string value is *whatever* but the condition string. I don't know all the possible values, that's what I was wondering if a "catch-all" tag was available.

kevinr
Star Contributor
Star Contributor
The <a:booleanEvaluator> is flexible and can be used for this purpose. You can use any of the usual JSF expression language into the value to be tested. There are many examples of using the boolean evaluator in the alfresco jsps.

Thanks,

Kevin