Author: awiner
Date: Wed Feb 7 13:51:43 2007
New Revision: 504706
URL: http://svn.apache.org/viewvc?view=rev&rev=504706
Log:
Merge in from trunk: ADFFACES-376: Calls to UIXCollection.setVar() do not clear
the cached value in the internal state
Added:
incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/Collection.xml
- copied unchanged from r504704,
incubator/adffaces/trunk/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/Collection.xml
incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/UIXCollectionTag.java
- copied, changed from r504704,
incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/UIXCollectionTag.java
Modified:
incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXCollection.java
incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/Iterator.xml
incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/NavigationLevel.xml
incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/NavigationPath.xml
incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/NavigationTree.xml
incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/Page.xml
incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/Process.xml
incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/Tree.xml
Modified:
incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXCollection.java
URL:
http://svn.apache.org/viewvc/incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXCollection.java?view=diff&rev=504706&r1=504705&r2=504706
==============================================================================
---
incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXCollection.java
(original)
+++
incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXCollection.java
Wed Feb 7 13:51:43 2007
@@ -37,12 +37,15 @@
import javax.faces.event.PhaseId;
import javax.faces.render.Renderer;
+import org.apache.myfaces.trinidad.bean.FacesBean;
+import org.apache.myfaces.trinidad.bean.PropertyKey;
import org.apache.myfaces.trinidad.event.SelectionEvent;
import org.apache.myfaces.trinidad.logging.TrinidadLogger;
import org.apache.myfaces.trinidad.model.CollectionModel;
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.ComponentUtils;
/**
@@ -55,6 +58,11 @@
public abstract class UIXCollection extends UIXComponentBase
implements NamingContainer
{
+ static public final FacesBean.Type TYPE = new FacesBean.Type(
+ UIXComponentBase.TYPE);
+ static public final PropertyKey VAR_KEY =
+ TYPE.registerKey("var", String.class, PropertyKey.CAP_NOT_BOUND);
+
protected UIXCollection(String rendererType)
{
super(rendererType);
@@ -65,6 +73,30 @@
this(null);
}
+ /**
+ * Gets the name of the EL variable used to reference each element of
+ * this collection. Once this component has completed rendering, this
+ * variable is removed (or reverted back to its previous value).
+ */
+ final public String getVar()
+ {
+ return ComponentUtils.resolveString(getProperty(VAR_KEY));
+ }
+
+ /**
+ * Sets the name of the EL variable used to reference each element of
+ * this collection. Once this component has completed rendering, this
+ * variable is removed (or reverted back to its previous value).
+ */
+ final public void setVar(String var)
+ {
+ setProperty(VAR_KEY, (var));
+ InternalState iState = _getInternalState(false);
+ if (iState != null)
+ {
+ iState._var = var;
+ }
+ }
/**
* Queues an event. If there is a currency set on this table, then
@@ -370,11 +402,6 @@
{
return getCollectionModel().getRowData(rowIndex);
}
-
- /**
- * Gets the EL variable name to use when iterating through the collection's
data.
- */
- public abstract String getVar();
/**
* Gets the EL variable name to use to expose the varStatusMap.
Modified:
incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/Iterator.xml
URL:
http://svn.apache.org/viewvc/incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/Iterator.xml?view=diff&rev=504706&r1=504705&r2=504706
==============================================================================
---
incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/Iterator.xml
(original)
+++
incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/Iterator.xml
Wed Feb 7 13:51:43 2007
@@ -37,20 +37,6 @@
<component-type>org.apache.myfaces.trinidad.Iterator</component-type>
<component-class>org.apache.myfaces.trinidad.component.UIXIterator</component-class>
<property>
- <description><![CDATA[Name of the EL variable used to reference each
element of this collection.
- Once this component has completed rendering, this variable is
- removed (or reverted back to its previous value).]]>
- </description>
- <property-name>var</property-name>
- <property-class>java.lang.String</property-class>
- <property-extension>
- <mfp:literal-only>true</mfp:literal-only>
- <mfp:property-metadata>
- <mfp:preferred>true</mfp:preferred>
- </mfp:property-metadata>
- </property-extension>
- </property>
- <property>
<description><![CDATA[<html>
Name of the EL variable used to reference the varStatus information.
Once this component has completed rendering, this variable is
@@ -116,7 +102,7 @@
</property>
<component-extension>
<mfp:component-family>org.apache.myfaces.trinidad.Iterator</mfp:component-family>
-
<mfp:component-supertype>org.apache.myfaces.trinidad.ComponentBase</mfp:component-supertype>
+
<mfp:component-supertype>org.apache.myfaces.trinidad.CollectionBase</mfp:component-supertype>
<mfp:component-superclass>UIXCollection</mfp:component-superclass>
<mfp:tag-name>tr:iterator</mfp:tag-name>
<mfp:tag-class>org.apache.myfaces.trinidadinternal.taglib.UIXIteratorTag</mfp:tag-class>
Modified:
incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/NavigationLevel.xml
URL:
http://svn.apache.org/viewvc/incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/NavigationLevel.xml?view=diff&rev=504706&r1=504705&r2=504706
==============================================================================
---
incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/NavigationLevel.xml
(original)
+++
incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/NavigationLevel.xml
Wed Feb 7 13:51:43 2007
@@ -68,20 +68,6 @@
</property-extension>
</property>
<property>
- <description><![CDATA[Name of the EL variable used to reference each
element of this collection.
- Once this component has completed rendering, this variable is
- removed (or reverted back to its previous value).]]>
- </description>
- <property-name>var</property-name>
- <property-class>java.lang.String</property-class>
- <property-extension>
- <mfp:literal-only>true</mfp:literal-only>
- <mfp:property-metadata>
- <mfp:preferred>true</mfp:preferred>
- </mfp:property-metadata>
- </property-extension>
- </property>
- <property>
<description><![CDATA[<html>
Name of the EL variable used to reference the varStatus information.
Once this component has completed rendering, this variable is
@@ -103,7 +89,7 @@
</property>
<component-extension>
<mfp:component-family>org.apache.myfaces.trinidad.NavigationLevel</mfp:component-family>
-
<mfp:component-supertype>org.apache.myfaces.trinidad.ComponentBase</mfp:component-supertype>
+
<mfp:component-supertype>org.apache.myfaces.trinidad.CollectionBase</mfp:component-supertype>
<mfp:component-superclass>org.apache.myfaces.trinidad.component.UIXNavigationHierarchy</mfp:component-superclass>
<mfp:renderer-type>org.apache.myfaces.trinidad.NavigationLevel</mfp:renderer-type>
<mfp:naming-container>true</mfp:naming-container>
Modified:
incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/NavigationPath.xml
URL:
http://svn.apache.org/viewvc/incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/NavigationPath.xml?view=diff&rev=504706&r1=504705&r2=504706
==============================================================================
---
incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/NavigationPath.xml
(original)
+++
incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/NavigationPath.xml
Wed Feb 7 13:51:43 2007
@@ -58,20 +58,6 @@
</property-extension>
</property>
<property>
- <description><![CDATA[Name of the EL variable used to reference each
element of this collection.
- Once this component has completed rendering, this variable is
- removed (or reverted back to its previous value).]]>
- </description>
- <property-name>var</property-name>
- <property-class>java.lang.String</property-class>
- <property-extension>
- <mfp:literal-only>true</mfp:literal-only>
- <mfp:property-metadata>
- <mfp:preferred>true</mfp:preferred>
- </mfp:property-metadata>
- </property-extension>
- </property>
- <property>
<description><![CDATA[<html>
Name of the EL variable used to reference the varStatus information.
Once this component has completed rendering, this variable is
@@ -93,7 +79,7 @@
</property>
<component-extension>
<mfp:component-family>org.apache.myfaces.trinidad.NavigationPath</mfp:component-family>
-
<mfp:component-supertype>org.apache.myfaces.trinidad.ComponentBase</mfp:component-supertype>
+
<mfp:component-supertype>org.apache.myfaces.trinidad.CollectionBase</mfp:component-supertype>
<mfp:component-superclass>org.apache.myfaces.trinidad.component.UIXNavigationHierarchy</mfp:component-superclass>
<mfp:renderer-type>org.apache.myfaces.trinidad.Path</mfp:renderer-type>
<mfp:naming-container>true</mfp:naming-container>
Modified:
incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/NavigationTree.xml
URL:
http://svn.apache.org/viewvc/incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/NavigationTree.xml?view=diff&rev=504706&r1=504705&r2=504706
==============================================================================
---
incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/NavigationTree.xml
(original)
+++
incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/NavigationTree.xml
Wed Feb 7 13:51:43 2007
@@ -75,20 +75,6 @@
</property-extension>
</property>
<property>
- <description><![CDATA[Name of the EL variable used to reference each
element of this collection.
- Once this component has completed rendering, this variable is
- removed (or reverted back to its previous value).]]>
- </description>
- <property-name>var</property-name>
- <property-class>java.lang.String</property-class>
- <property-extension>
- <mfp:literal-only>true</mfp:literal-only>
- <mfp:property-metadata>
- <mfp:preferred>true</mfp:preferred>
- </mfp:property-metadata>
- </property-extension>
- </property>
- <property>
<description><![CDATA[<html>
Name of the EL variable used to reference the varStatus information.
Once this component has completed rendering, this variable is
@@ -125,7 +111,7 @@
</property>
<component-extension>
<mfp:component-family>org.apache.myfaces.trinidad.NavigationTree</mfp:component-family>
-
<mfp:component-supertype>org.apache.myfaces.trinidad.ComponentBase</mfp:component-supertype>
+
<mfp:component-supertype>org.apache.myfaces.trinidad.CollectionBase</mfp:component-supertype>
<mfp:component-superclass>org.apache.myfaces.trinidad.component.UIXNavigationHierarchy</mfp:component-superclass>
<mfp:renderer-type>org.apache.myfaces.trinidad.NavigationTree</mfp:renderer-type>
<mfp:tag-class>org.apache.myfaces.trinidadinternal.taglib.UIXNavigationTreeTag</mfp:tag-class>
Modified:
incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/Page.xml
URL:
http://svn.apache.org/viewvc/incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/Page.xml?view=diff&rev=504706&r1=504705&r2=504706
==============================================================================
---
incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/Page.xml
(original)
+++
incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/Page.xml
Wed Feb 7 13:51:43 2007
@@ -59,20 +59,6 @@
</property-extension>
</property>
<property>
- <description><![CDATA[Name of the EL variable used to reference each
element of this collection.
- Once this component has completed rendering, this variable is
- removed (or reverted back to its previous value).]]>
- </description>
- <property-name>var</property-name>
- <property-class>java.lang.String</property-class>
- <property-extension>
- <mfp:literal-only>true</mfp:literal-only>
- <mfp:property-metadata>
- <mfp:preferred>true</mfp:preferred>
- </mfp:property-metadata>
- </property-extension>
- </property>
- <property>
<description><![CDATA[<html>
Name of the EL variable used to reference the varStatus information.
Once this component has completed rendering, this variable is
@@ -109,7 +95,7 @@
</property>
<component-extension>
<mfp:component-family>org.apache.myfaces.trinidad.Page</mfp:component-family>
-
<mfp:component-supertype>org.apache.myfaces.trinidad.ComponentBase</mfp:component-supertype>
+
<mfp:component-supertype>org.apache.myfaces.trinidad.CollectionBase</mfp:component-supertype>
<mfp:component-superclass>org.apache.myfaces.trinidad.component.UIXNavigationHierarchy</mfp:component-superclass>
<mfp:renderer-type>org.apache.myfaces.trinidad.BasePage</mfp:renderer-type>
<mfp:tag-class>org.apache.myfaces.trinidadinternal.taglib.UIXPageTag</mfp:tag-class>
Modified:
incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/Process.xml
URL:
http://svn.apache.org/viewvc/incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/Process.xml?view=diff&rev=504706&r1=504705&r2=504706
==============================================================================
---
incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/Process.xml
(original)
+++
incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/Process.xml
Wed Feb 7 13:51:43 2007
@@ -55,20 +55,6 @@
</property-extension>
</property>
<property>
- <description><![CDATA[Name of the EL variable used to reference each
element of this collection.
- Once this component has completed rendering, this variable is
- removed (or reverted back to its previous value).]]>
- </description>
- <property-name>var</property-name>
- <property-class>java.lang.String</property-class>
- <property-extension>
- <mfp:literal-only>true</mfp:literal-only>
- <mfp:property-metadata>
- <mfp:preferred>true</mfp:preferred>
- </mfp:property-metadata>
- </property-extension>
- </property>
- <property>
<description><![CDATA[<html>
Name of the EL variable used to reference the varStatus information.
Once this component has completed rendering, this variable is
@@ -90,7 +76,7 @@
</property>
<component-extension>
<mfp:component-family>org.apache.myfaces.trinidad.Process</mfp:component-family>
-
<mfp:component-supertype>org.apache.myfaces.trinidad.ComponentBase</mfp:component-supertype>
+
<mfp:component-supertype>org.apache.myfaces.trinidad.CollectionBase</mfp:component-supertype>
<mfp:component-superclass>org.apache.myfaces.trinidad.component.UIXNavigationHierarchy</mfp:component-superclass>
<mfp:renderer-type>org.apache.myfaces.trinidad.ChoiceBar</mfp:renderer-type>
<mfp:tag-class>org.apache.myfaces.trinidadinternal.taglib.UIXProcessTag</mfp:tag-class>
Modified:
incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/Tree.xml
URL:
http://svn.apache.org/viewvc/incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/Tree.xml?view=diff&rev=504706&r1=504705&r2=504706
==============================================================================
---
incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/Tree.xml
(original)
+++
incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/Tree.xml
Wed Feb 7 13:51:43 2007
@@ -47,20 +47,6 @@
<facet-name>nodeStamp</facet-name>
</facet>
<property>
- <description><![CDATA[Name of the EL variable used to reference each
element of this collection.
- Once this component has completed rendering, this variable is
- removed (or reverted back to its previous value).]]>
- </description>
- <property-name>var</property-name>
- <property-class>java.lang.String</property-class>
- <property-extension>
- <mfp:literal-only>true</mfp:literal-only>
- <mfp:property-metadata>
- <mfp:preferred>true</mfp:preferred>
- </mfp:property-metadata>
- </property-extension>
- </property>
- <property>
<description><![CDATA[<html>
Name of the EL variable used to reference the varStatus information.
Once this component has completed rendering, this variable is
@@ -122,7 +108,7 @@
<component-extension>
<mfp:component-family>org.apache.myfaces.trinidad.Tree</mfp:component-family>
-
<mfp:component-supertype>org.apache.myfaces.trinidad.ComponentBase</mfp:component-supertype>
+
<mfp:component-supertype>org.apache.myfaces.trinidad.CollectionBase</mfp:component-supertype>
<mfp:component-superclass>org.apache.myfaces.trinidad.component.UIXHierarchy</mfp:component-superclass>
<mfp:renderer-type>org.apache.myfaces.trinidad.Tree</mfp:renderer-type>
<mfp:tag-class>org.apache.myfaces.trinidadinternal.taglib.UIXTreeTag</mfp:tag-class>
Copied:
incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/UIXCollectionTag.java
(from r504704,
incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/UIXCollectionTag.java)
URL:
http://svn.apache.org/viewvc/incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/UIXCollectionTag.java?view=diff&rev=504706&p1=incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/UIXCollectionTag.java&r1=504704&p2=incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/UIXCollectionTag.java&r2=504706
==============================================================================
---
incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/UIXCollectionTag.java
(original)
+++
incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/UIXCollectionTag.java
Wed Feb 7 13:51:43 2007
@@ -20,13 +20,13 @@
import org.apache.myfaces.trinidad.bean.FacesBean;
import org.apache.myfaces.trinidad.component.UIXCollection;
-import org.apache.myfaces.trinidad.webapp.UIXComponentTag;
+import org.apache.myfaces.trinidad.webapp.UIXComponentELTag;
/**
* Manually written because we don't auto-generate UIXCollection,
* and we can't currently auto-generate only one of the two.
*/
-abstract public class UIXCollectionTag extends UIXComponentTag
+abstract public class UIXCollectionTag extends UIXComponentELTag
{
/**
* Construct an instance of the UIXCollectionTag.
@@ -46,7 +46,7 @@
FacesBean bean)
{
super.setProperties(bean);
- setProperty(bean, UIXCollection.VAR_KEY, _var);
+ bean.setProperty(UIXCollection.VAR_KEY, _var);
}
@Override