[jboss-cvs] jboss-seam/src/main/org/jboss/seam/core ...
Gavin King
gavin.king at jboss.com
Fri Jun 1 15:33:17 EDT 2007
User: gavin
Date: 07/06/01 15:33:17
Modified: src/main/org/jboss/seam/core Expressions.java
Removed: src/main/org/jboss/seam/core JBossELInstaller.java
Log:
simplify JBoss EL integration
Revision Changes Path
1.32 +4 -26 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.31
retrieving revision 1.32
diff -u -b -r1.31 -r1.32
--- Expressions.java 1 Jun 2007 18:42:42 -0000 1.31
+++ Expressions.java 1 Jun 2007 19:33:17 -0000 1.32
@@ -1,4 +1,4 @@
-//$Id: Expressions.java,v 1.31 2007/06/01 18:42:42 gavin Exp $
+//$Id: Expressions.java,v 1.32 2007/06/01 19:33:17 gavin Exp $
package org.jboss.seam.core;
import static org.jboss.seam.InterceptionType.NEVER;
@@ -14,7 +14,6 @@
import org.hibernate.validator.ClassValidator;
import org.hibernate.validator.InvalidValue;
-import org.jboss.el.lang.EvaluationContext;
import org.jboss.seam.Component;
import org.jboss.seam.Model;
import org.jboss.seam.ScopeType;
@@ -22,7 +21,6 @@
import org.jboss.seam.annotations.Intercept;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.el.SeamFunctionMapper;
/**
* Factory for method and value bindings
@@ -37,16 +35,11 @@
{
/**
- * Get an appropriate ExpressionFactory. If there is an active JSF
- * request, use JSF's ExpressionFactory. Otherwise, use one that we
- * created.
+ * Get the JBoss EL ExpressionFactory
*/
public ExpressionFactory getExpressionFactory()
{
- FacesContext facesContext = FacesContext.getCurrentInstance();
- return facesContext==null ?
- EXPRESSION_FACTORY :
- facesContext.getApplication().getExpressionFactory();
+ return EXPRESSION_FACTORY;
}
/**
@@ -56,22 +49,7 @@
public ELContext getELContext()
{
FacesContext facesContext = FacesContext.getCurrentInstance();
- return decorateELContext( facesContext==null ? EL_CONTEXT : facesContext.getELContext() );
- }
-
- /**
- * Wrap the base ELContext, adding Seam's FunctionMapper.
- *
- * Thus, any expressions with s:hasRole, s:hasPermission
- * must be evaluated either via Facelets/JSP (since they
- * are declared in the tld/taglib.xml or via the
- * Expressions component.
- *
- * @param context the JSF ELContext
- */
- private EvaluationContext decorateELContext(ELContext context)
- {
- return new EvaluationContext( context, new SeamFunctionMapper( context.getFunctionMapper() ), context.getVariableMapper() );
+ return facesContext==null ? EL_CONTEXT : facesContext.getELContext();
}
public ValueExpression<Object> createValueExpression(String expression)
More information about the jboss-cvs-commits
mailing list