You are viewing a plain text version of this content. The canonical link for it is here.
Posted to adffaces-commits@incubator.apache.org by aw...@apache.org on 2007/01/06 00:28:05 UTC

svn commit: r493254 - /incubator/adffaces/branches/faces-1_2-070102/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/ForEachTag.java

Author: awiner
Date: Fri Jan  5 16:28:04 2007
New Revision: 493254

URL: http://svn.apache.org/viewvc?view=rev&rev=493254
Log:
JSF 1.2 and af:forEach:  work around an as-yet not understood
problem with using the JSP ELContext to evaluate ValueExpressions.
A simple List property of a managed bean is not properly being
retrieved when going through JSPs (null is retrieved), but comes
back fine when passing the JSF ELContext, at least in the recent-ish
build of Glassfish I'm testing with at the moment.

Modified:
    incubator/adffaces/branches/faces-1_2-070102/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/ForEachTag.java

Modified: incubator/adffaces/branches/faces-1_2-070102/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/ForEachTag.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/faces-1_2-070102/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/ForEachTag.java?view=diff&rev=493254&r1=493253&r2=493254
==============================================================================
--- incubator/adffaces/branches/faces-1_2-070102/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/ForEachTag.java (original)
+++ incubator/adffaces/branches/faces-1_2-070102/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/ForEachTag.java Fri Jan  5 16:28:04 2007
@@ -105,7 +105,13 @@
 
     if (null != _items)
     {
-      Object items = _items.getValue(pageContext.getELContext());
+      // AdamWiner: for reasons I cannot yet explain, using the JSP's
+      // ELContext is giving me big problems trying to grab Lists
+      // from inside of managed beans.  Switching this one call
+      // to the JSF ELContext seems to resolve that.  We certainly
+      // have to use the JSPs ELResolver for calling through
+      // to the VariableMapper
+      Object items = _items.getValue(context.getELContext());//pageContext.getELContext());
 
       //pu: If items is specified and resolves to null, it is treated as an
       //  empty collection, i.e., no iteration is performed.