[jboss-cvs] jboss-seam/src/main/org/jboss/seam/core ...
Gavin King
gavin.king at jboss.com
Wed May 16 11:46:58 EDT 2007
User: gavin
Date: 07/05/16 11:46:58
Modified: src/main/org/jboss/seam/core Expressions.java
Log:
use delegation instead
Revision Changes Path
1.25 +14 -6 jboss-seam/src/main/org/jboss/seam/core/Expressions.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: Expressions.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/core/Expressions.java,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -b -r1.24 -r1.25
--- Expressions.java 4 May 2007 05:58:23 -0000 1.24
+++ Expressions.java 16 May 2007 15:46:57 -0000 1.25
@@ -1,4 +1,4 @@
-//$Id: Expressions.java,v 1.24 2007/05/04 05:58:23 sbryzak2 Exp $
+//$Id: Expressions.java,v 1.25 2007/05/16 15:46:57 gavin Exp $
package org.jboss.seam.core;
import static org.jboss.seam.InterceptionType.NEVER;
@@ -33,21 +33,29 @@
@Intercept(NEVER)
@Install(precedence=BUILT_IN)
@Name("org.jboss.seam.core.expressions")
-public class Expressions
- implements Serializable
+public class Expressions implements Serializable
{
public ExpressionFactory getExpressionFactory()
{
FacesContext facesContext = FacesContext.getCurrentInstance();
- return facesContext==null ? EXPRESSION_FACTORY : facesContext.getApplication().getExpressionFactory();
+ return facesContext==null ?
+ EXPRESSION_FACTORY :
+ facesContext.getApplication().getExpressionFactory();
}
public ELContext getELContext()
{
FacesContext facesContext = FacesContext.getCurrentInstance();
- return facesContext==null ? EL_CONTEXT : new EvaluationContext(facesContext.getELContext(),
- new SeamELFunctionMapper(), facesContext.getELContext().getVariableMapper());
+ if ( facesContext==null )
+ {
+ return EL_CONTEXT;
+ }
+ else
+ {
+ ELContext context = facesContext.getELContext();
+ return new EvaluationContext( context, new SeamELFunctionMapper( context.getFunctionMapper() ), context.getVariableMapper() );
+ }
}
public ValueExpression<Object> createValueExpression(String expression)
More information about the jboss-cvs-commits
mailing list