You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by an...@apache.org on 2012/11/29 21:06:22 UTC
svn commit: r1415347 -
/myfaces/trinidad/trunk/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXCollection.java
Author: andys
Date: Thu Nov 29 20:06:21 2012
New Revision: 1415347
URL: http://svn.apache.org/viewvc?rev=1415347&view=rev
Log:
TRINIDAD-2343 Hook for overriding UIXCollection temp var storage
Added new UIXCollection.setupELVariable() protected hook.
Modified:
myfaces/trinidad/trunk/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXCollection.java
Modified: myfaces/trinidad/trunk/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXCollection.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXCollection.java?rev=1415347&r1=1415346&r2=1415347&view=diff
==============================================================================
--- myfaces/trinidad/trunk/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXCollection.java (original)
+++ myfaces/trinidad/trunk/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXCollection.java Thu Nov 29 20:06:21 2012
@@ -56,6 +56,7 @@ import org.apache.myfaces.trinidad.model
import org.apache.myfaces.trinidad.model.SortCriterion;
import org.apache.myfaces.trinidad.render.ClientRowKeyManager;
import org.apache.myfaces.trinidad.render.ClientRowKeyManagerFactory;
+import org.apache.myfaces.trinidad.util.Args;
import org.apache.myfaces.trinidad.util.ComponentUtils;
@@ -2086,7 +2087,27 @@ public abstract class UIXCollection exte
// we need to place each row at an EL reachable place so that it
// can be accessed via the 'var' variable. Let's place it on the
// requestMap:
- return TableUtils.setupELVariable(getFacesContext(), varName, newData);
+ return setupELVariable(getFacesContext(), varName, newData);
+ }
+
+ /**
+ * Called by UIXCollection to set values for the "var" and
+ * "varStatus" EL variables.
+ *
+ * @param context the FacesContext for the current request
+ * @param name the non-null name of the EL variable
+ * @param value the value of the EL variable
+ * @return the previous value of the EL variable, or null if
+ * the value was not previously set.
+ */
+ protected Object setupELVariable(
+ FacesContext context,
+ String name,
+ Object value
+ )
+ {
+ Args.notNull(name, "name");
+ return TableUtils.setupELVariable(context, name, value);
}
private static boolean _equals(Object a, Object b)