Question: How would I get the length of an `ArrayList` using a JSF EL expression? 

```
#{MyBean.somelist.length}

```

does not work.

Answer: 
Yes, since some genius in the Java API creation committee decided that, even though certain classes have `size()` members or `length` attributes, they won't implement `getSize()` or `getLength()` which JSF and most other standards require, you can't do what you want.

There's a couple ways to do this.

One: add a function to your Bean that returns the length:

```

In class MyBean:
public int getSomelistLength() { return this.somelist.length; }

In your JSF page:
#{MyBean.somelistLength}

```

Two: If you're using Facelets (Oh, God, why aren't you using Facelets!), you can add the fn namespace and use the length function

```

In JSF page:
#{ fn:length(MyBean.somelist) }

```
After 7 years... the facelets solution still works fine for me as a jsf user

include the namespace as 
`xmlns:fn="http://java.sun.com/jsp/jstl/functions"`

and use the EL as 
`#{fn:length(myBean.someList)}` for example if using in jsf ui:fragment below example works fine

```
<ui:fragment rendered="#{fn:length(myBean.someList) gt 0}">
    <!-- Do something here-->
</ui:fragment>

```