javadoc
This commit is contained in:
@@ -13,14 +13,20 @@ import org.springframework.binding.expression.el.ELExpressionParser;
|
||||
/**
|
||||
* A JSF-aware ExpressionParser that allows JSF 1.1 managed beans to be referenced in expressions in the FlowDefinition.
|
||||
* @author Jeremy Grelle
|
||||
*
|
||||
*/
|
||||
public class Jsf11ELExpressionParser extends ELExpressionParser {
|
||||
|
||||
/**
|
||||
* Creates a new JSF 1.1 compatible expression parser
|
||||
* @param expressionFactory the unified EL expression factory implementation
|
||||
*/
|
||||
public Jsf11ELExpressionParser(ExpressionFactory expressionFactory) {
|
||||
super(expressionFactory, new Jsf11ELContextFactory());
|
||||
}
|
||||
|
||||
/**
|
||||
* Inner helper class that plus in the EL Resolver that resolves expressions using JSF 1.1 APIs.
|
||||
*/
|
||||
private static class Jsf11ELContextFactory extends DefaultELContextFactory {
|
||||
|
||||
public ELContext getEvaluationContext(Object target) {
|
||||
@@ -29,7 +35,7 @@ public class Jsf11ELExpressionParser extends ELExpressionParser {
|
||||
|
||||
private static class Jsf11ELContext extends ELContext {
|
||||
|
||||
ELResolver baseResolver;
|
||||
private ELResolver baseResolver;
|
||||
|
||||
public Jsf11ELContext(FacesContext context) {
|
||||
baseResolver = new Jsf11ELResolverAdapter(context);
|
||||
|
||||
@@ -16,13 +16,16 @@ import javax.faces.el.VariableResolver;
|
||||
|
||||
/**
|
||||
* An adapter for using JSF 1.1 {@link VariableResolver}s and {@link PropertyResolver}s in an {@link ELContext}.
|
||||
* @author Jeremy Grelle
|
||||
*
|
||||
* @author Jeremy Grelle0
|
||||
*/
|
||||
public class Jsf11ELResolverAdapter extends ELResolver {
|
||||
|
||||
private FacesContext facesContext;
|
||||
|
||||
/**
|
||||
* Creates a new adapter that adapts JSF 1.1 EL constructs to the Unified EL Resolver construct.
|
||||
* @param facesContext the current faces context
|
||||
*/
|
||||
public Jsf11ELResolverAdapter(FacesContext facesContext) {
|
||||
this.facesContext = facesContext;
|
||||
}
|
||||
|
||||
@@ -10,14 +10,21 @@ import org.springframework.binding.expression.el.ELExpressionParser;
|
||||
/**
|
||||
* A JSF-aware ExpressionParser that allows JSF 1.2 managed beans to be referenced in expressions in the FlowDefinition.
|
||||
* @author Jeremy Grelle
|
||||
*
|
||||
*/
|
||||
public class Jsf12ELExpressionParser extends ELExpressionParser {
|
||||
|
||||
/**
|
||||
* Creates a JSF 1.2 expression parser
|
||||
* @param expressionFactory the unified EL expression factory implementation to use
|
||||
*/
|
||||
public Jsf12ELExpressionParser(ExpressionFactory expressionFactory) {
|
||||
super(expressionFactory, new Jsf12ELContextFactory());
|
||||
}
|
||||
|
||||
/**
|
||||
* Simple little helper that grabs the current EL context from the faces context to support EL expression
|
||||
* evaluation.
|
||||
*/
|
||||
private static class Jsf12ELContextFactory extends DefaultELContextFactory {
|
||||
public ELContext getEvaluationContext(Object target) {
|
||||
return FacesContext.getCurrentInstance().getELContext();
|
||||
|
||||
Reference in New Issue
Block a user