Using multiple boolean conditions in EL expression

and-operator, el, jsf, or-operator

Solution

The operator has to go inside the EL expression, not outside. You should see the `#{...}` as one big scope wherein various variables/conditions interact with each other.

<x:someComponent rendered="#{bean.condition1 or bean.condition2}">

See also:

- Our EL wiki page

- Conditionally displaying JSF components

- How to conditionally render plain HTML elements like <div>s?

Problem

I would like to know how can I combine multiple boolean coniditions in EL. I have following example and it is not working. ``` <x:someComponent rendered="#{bean.condition1} or #{bean.condition2}"> ``` How can I use "OR" and "AND" logical operators in EL?

Original source

Related problems