[jboss-cvs] jboss-seam/src/main/org/jboss/seam/core ...
Gavin King
gavin.king at jboss.com
Thu Oct 26 15:12:39 EDT 2006
User: gavin
Date: 06/10/26 15:12:39
Modified: src/main/org/jboss/seam/core Expressions.java
Log:
use EL outside of JSF
Revision Changes Path
1.7 +11 -4 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.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- Expressions.java 26 Oct 2006 17:42:23 -0000 1.6
+++ Expressions.java 26 Oct 2006 19:12:39 -0000 1.7
@@ -1,8 +1,7 @@
-//$Id: Expressions.java,v 1.6 2006/10/26 17:42:23 gavin Exp $
+//$Id: Expressions.java,v 1.7 2006/10/26 19:12:39 gavin Exp $
package org.jboss.seam.core;
import static org.jboss.seam.InterceptionType.NEVER;
-import static org.jboss.seam.util.EL.*;
import java.io.Serializable;
@@ -14,6 +13,8 @@
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Scope;
import org.jboss.seam.annotations.Startup;
+import org.jboss.seam.util.UnifiedELMethodBinding;
+import org.jboss.seam.util.UnifiedELValueBinding;
/**
* Factory for method and value bindings
@@ -64,7 +65,10 @@
{
if (cachedValueBinding==null)
{
- cachedValueBinding = FacesContext.getCurrentInstance().getApplication().createValueBinding(expression);
+ FacesContext context = FacesContext.getCurrentInstance();
+ cachedValueBinding = context==null ?
+ new UnifiedELValueBinding(expression) :
+ context.getApplication().createValueBinding(expression);
}
return cachedValueBinding;
}
@@ -104,7 +108,10 @@
{
if (cachedMethodBinding==null)
{
- cachedMethodBinding = FacesContext.getCurrentInstance().getApplication().createMethodBinding(expression, null);
+ FacesContext context = FacesContext.getCurrentInstance();
+ cachedMethodBinding = context==null ?
+ new UnifiedELMethodBinding(expression, null) :
+ context.getApplication().createMethodBinding(expression, null);
}
return cachedMethodBinding;
}
More information about the jboss-cvs-commits
mailing list