Invoke direct methods or methods with arguments / variables / parameters in EL

Viewed 29358

How can I in JSF 2.0 invoke direct methods or methods with arguments / variables / parameters in EL?

For example, getting the list size in EL:

<h:outputText value="#{bean.list.size()}" />

Or invoking an action method with arguments:

<h:commandButton value="edit" action="#{bean.edit(item)}" />

This does not seem to work in my environment. It doesn't seem to like parentheses.

javax.el.ELException: Error Parsing: #{bean.list.size()}
com.sun.el.parser.ParseException: Encountered "("

2 Answers
Related