Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to check if condition in JSF tag

Tags:

jsf

<h:commandLink value="next" action="#{student.getNext()}"  rendered="#{! (student.maximumSize<=student.idvalue.size)}" ></h:commandLink>

But I'm getting error in student.maximumSize<=student.idvalue.size

<= What can I replace here .. ??

like image 366
ashokhein Avatar asked Dec 18 '25 09:12

ashokhein


1 Answers

Best is to remove the ! and use gt

<h:commandLink rendered="#{student.maximumSize gt student.idvalue.size}" value="next" action="#{student.getNext()}"></h:commandLink>

or try this

<h:commandLink rendered="#{not (student.maximumSize le student.idvalue.size)}" value="next" action="#{student.getNext()}"></h:commandLink>

Here the el expressions that should be used instead of the signs like == < > etc...

==  -->  eq
!=  -->  ne
<   -->  lt
>   -->  gt
<=  -->  le
>=  -->  ge
like image 157
Daniel Avatar answered Dec 21 '25 04:12

Daniel



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!