user2061913
user2061913

Reputation: 920

a range instead of equals for a render syntax

i have got a render that looks at a bean and if it is the same as a value above then it will render or not, this is working fine :

rendered="#{formBean.number eq 1} 

what i want to do now though, is add if it is in a range, between 1 and 8 for example, is this possible if so what is the syntax as a quick google haven't shown up any results

Thanks

Upvotes: 0

Views: 58

Answers (1)

user1983983
user1983983

Reputation: 4841

You can use le (less equal) and ge (greater equal) in java EL to achieve this:

rendered="#{formBean.number ge 1 and formBean.number le 8}

Upvotes: 1

Related Questions