This project has retired. For details please refer to its Attic page.
ELAttributeEvaluator (Tiles 2 2.1.4 API)

org.apache.tiles.evaluator.el
Class ELAttributeEvaluator

Package class diagram package ELAttributeEvaluator
java.lang.Object
  extended by org.apache.tiles.evaluator.AbstractAttributeEvaluator
      extended by org.apache.tiles.evaluator.el.ELAttributeEvaluator
All Implemented Interfaces:
TilesApplicationContextAware, AttributeEvaluator

public class ELAttributeEvaluator
extends AbstractAttributeEvaluator
implements TilesApplicationContextAware

Evaluates string expression with typical EL syntax.
You can use normal EL syntax, knowing that the root objects are TilesRequestContext, TilesApplicationContext and beans contained in request, session and application scope.

Since:
2.1.0
Version:
$Rev: 817362 $ $Date: 2009-09-21 20:31:12 +0200 (lun, 21 set 2009) $

Field Summary
protected  TilesApplicationContext applicationContext
          The Tiles application context.
static String EXPRESSION_FACTORY_FACTORY_INIT_PARAM
          Initialization parameter to decide the implementation of ExpressionFactoryFactory.
protected  javax.el.ExpressionFactory expressionFactory
          The EL expression factory.
protected  javax.el.ELResolver resolver
          The EL resolver to use.
 
Constructor Summary
ELAttributeEvaluator()
          Constructor.
 
Method Summary
 Object evaluate(String expression, TilesRequestContext request)
          Evaluates an expression.
 void init(Map<String,String> initParameters)
          Initializes the attribute evaluator.
 void setApplicationContext(TilesApplicationContext applicationContext)
          Sets the Tiles application context.
 void setExpressionFactory(javax.el.ExpressionFactory expressionFactory)
          Sets the expression factory to use.
 void setResolver(javax.el.ELResolver resolver)
          Sets the EL resolver to use.
 
Methods inherited from class org.apache.tiles.evaluator.AbstractAttributeEvaluator
evaluate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EXPRESSION_FACTORY_FACTORY_INIT_PARAM

public static final String EXPRESSION_FACTORY_FACTORY_INIT_PARAM
Initialization parameter to decide the implementation of ExpressionFactoryFactory.

Since:
2.1.0
See Also:
Constant Field Values

applicationContext

protected TilesApplicationContext applicationContext
The Tiles application context.

Since:
2.1.0

expressionFactory

protected javax.el.ExpressionFactory expressionFactory
The EL expression factory.

Since:
2.1.0

resolver

protected javax.el.ELResolver resolver
The EL resolver to use.

Since:
2.1.0
Constructor Detail

ELAttributeEvaluator

public ELAttributeEvaluator()
Constructor.

Since:
2.1.0
Method Detail

init

public void init(Map<String,String> initParameters)
Initializes the attribute evaluator.

Specified by:
init in interface AttributeEvaluator
Parameters:
initParameters - The initialization parameters.

setApplicationContext

public void setApplicationContext(TilesApplicationContext applicationContext)
Sets the Tiles application context.

Specified by:
setApplicationContext in interface TilesApplicationContextAware
Parameters:
applicationContext - The Tiles application context.

setExpressionFactory

public void setExpressionFactory(javax.el.ExpressionFactory expressionFactory)
Sets the expression factory to use.

Parameters:
expressionFactory - The expression factory.
Since:
2.1.0

setResolver

public void setResolver(javax.el.ELResolver resolver)
Sets the EL resolver to use.

Parameters:
resolver - The EL resolver.
Since:
2.1.0

evaluate

public Object evaluate(String expression,
                       TilesRequestContext request)
Evaluates an expression.

Specified by:
evaluate in interface AttributeEvaluator
Parameters:
expression - The expression to evaluate.
request - The request object.
Returns:
The evaluated object.


Copyright © 2001-2009 Apache Software Foundation. All Rights Reserved.