Built with Seam

You can find the full source code for this website in the Seam package in the directory /examples/wiki. It is licensed under the LGPL.

MethodExpression and ValueExpression are classes defined by the Unified EL. A MethodExpression invokes an arbitrary method on an object. A ValueExpression only deals with getters and setters. In JSF 1.1, we had MethodBinding and ValueBinding that did almost the same thing.

It is not always obvious from the expression whether it is a MethodExpression or ValueExpression. However, the technology using the EL knows which kind it is based on the context.

For instance, JSF knows that this should always be treated as a ValueExpression: <h:inputText value="#{}"/>

And, this should always be treated as a MethodExpression: <f:actionListener binding="#{foo.listen}"/>

What's more, JSF knows what parameters should be sent to the listen method (yes, even without any parentheses or arguments).