Question: I've the below code which I find verbose:

```
#{bean.value eq 'S' || bean.value eq 'C'}

```

Can we simplify this using something like the SQL `IN` clause? Fictive example below:

```
#{bean.value in ('S','C')}

```

Answer: 
If you're using EL 3.0 (Java EE 7), then you can simply construct a `Collection` using `#{[x,y,z]}` syntax and perform a `contains()` on it. Provided that the desired bean property returns a `String` (and thus not `char` or `enum`), then this should do:

```
#{['S','C'].contains(bean.value)}

```

Or if you're only on EL 2.2 (Java EE 6), then you've got to hold the values in some `Collection` (e.g. `HashSet`) as a bean property and perform `contains()` on it:

```
#{bean.allowedValues.contains(bean.value)}

```

Or if you're even not on EL 2.2 yet, then, well, stick to your initial approach, or create a [custom EL function](https://stackoverflow.com/questions/7079978/how-to-create-a-custom-el-function) something like below:

```
#{f:contains(bean.value, bean.allowedValues)}

```

### See also:

* [Java EE 7 tutorial](http://docs.oracle.com/javaee/7/tutorial/)
	+ [9 Expression Language](http://docs.oracle.com/javaee/7/tutorial/jsf-el.htm#GJDDD)
		- [9.4 Operations on Collection Objects](http://docs.oracle.com/javaee/7/tutorial/jsf-el004.htm#CIHGABHD)
AFAIK You can't . But you can hold values to be checked against in a HashMap .
And you can then check as 

```
#{pageFlowScope.beanName.mapVar[bindings.Dept.attributeValue] == null}

```

You can check whether the value returned is null/empty or not.

Sid