From 04d4a78a03aec06f552ddf2e11c5a3d7b9323052 Mon Sep 17 00:00:00 2001 From: Keith Donald Date: Tue, 21 Aug 2007 07:10:33 +0000 Subject: [PATCH] javadoc --- .../faces/el/Jsf11ELExpressionParser.java | 10 ++++++++-- .../faces/el/Jsf11ELResolverAdapter.java | 7 +++++-- .../faces/el/Jsf12ELExpressionParser.java | 9 ++++++++- 3 files changed, 21 insertions(+), 5 deletions(-) diff --git a/spring-faces/src/main/java/org/springframework/faces/el/Jsf11ELExpressionParser.java b/spring-faces/src/main/java/org/springframework/faces/el/Jsf11ELExpressionParser.java index 559966d2..a840e5e8 100644 --- a/spring-faces/src/main/java/org/springframework/faces/el/Jsf11ELExpressionParser.java +++ b/spring-faces/src/main/java/org/springframework/faces/el/Jsf11ELExpressionParser.java @@ -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); diff --git a/spring-faces/src/main/java/org/springframework/faces/el/Jsf11ELResolverAdapter.java b/spring-faces/src/main/java/org/springframework/faces/el/Jsf11ELResolverAdapter.java index 537f8171..7628ab23 100644 --- a/spring-faces/src/main/java/org/springframework/faces/el/Jsf11ELResolverAdapter.java +++ b/spring-faces/src/main/java/org/springframework/faces/el/Jsf11ELResolverAdapter.java @@ -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; } diff --git a/spring-faces/src/main/java/org/springframework/faces/el/Jsf12ELExpressionParser.java b/spring-faces/src/main/java/org/springframework/faces/el/Jsf12ELExpressionParser.java index 4f7b69cc..2772044c 100644 --- a/spring-faces/src/main/java/org/springframework/faces/el/Jsf12ELExpressionParser.java +++ b/spring-faces/src/main/java/org/springframework/faces/el/Jsf12ELExpressionParser.java @@ -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();