0

Can i use open faces row condition to check output result?i tried to use in my code like this but it prints all the values regardless of condition

<o:row condition="#{item.errorCode==5}" >
   <o:cell>
       <h:outputText value="Fail"  />
   </o:cell>
</o:row>
<o:row condition="#{item.errorCode==3}" >
   <o:cell>
       <h:outputText value="Success"  />
   </o:cell>
</o:row>

is there any other way to do this?thanks

Bernad Ali
  • 1,699
  • 6
  • 23
  • 29

1 Answers1

1

You can use the validation in the rendered attribute of the to control the display.

<o:row>
    <o:cell>
        <h:outputText value="Fail" rendered="#{item.errorCode==5}"  />
        <h:outputText value="Success" rendered="#{item.errorCode==3}" />
    </o:cell>
</o:row>
Luiggi Mendoza
  • 85,076
  • 16
  • 154
  • 332