can open faces row condition used for display checking?

101 views Asked by At

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

1

There are 1 answers

0
Luiggi Mendoza On BEST ANSWER

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>