SeamFramework.orgCommunity Documentation

Chapter 6. Evaluating Unified EL

6.1. @Resolver

Solder provides a method to evaluate EL that is not dependent on JSF or JSP, a facility sadly missing in Java EE. To use it inject Expressions into your bean. You can evaluate value expressions, or method expressions. The Solder API provides type inference for you. For example:

class FruitBowl {

   @Inject Expressions expressions;
   public void run() {
      String fruitName = expressions.evaluateValueExpression("#{fruitBowl.fruitName}");
      Apple fruit = expressions.evaluateMethodExpression("#{fruitBown.getFruit}");

Solder also contains a qualifier to ease registration of javax.el.ELResolver instances. The @Resolver will register any javax.el.ELResolver annotated with @Resolver with the application wide javax.el.ELResolver.