incubator-adffaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From awi...@apache.org
Subject svn commit: r504704 - in /incubator/adffaces/trunk/trinidad: trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/ trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/ trinidad-impl/src/main/java/org/apache/myf...
Date Wed, 07 Feb 2007 21:41:59 GMT
Author: awiner
Date: Wed Feb  7 13:41:58 2007
New Revision: 504704

URL: http://svn.apache.org/viewvc?view=rev&rev=504704
Log:
ADFFACES-376: Calls to UIXCollection.setVar() do not clear the cached value in the internal
state

Added:
    incubator/adffaces/trunk/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/Collection.xml
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/UIXCollectionTag.java
Modified:
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXCollection.java
    incubator/adffaces/trunk/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/Iterator.xml
    incubator/adffaces/trunk/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/NavigationLevel.xml
    incubator/adffaces/trunk/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/NavigationPath.xml
    incubator/adffaces/trunk/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/NavigationTree.xml
    incubator/adffaces/trunk/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/Page.xml
    incubator/adffaces/trunk/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/Process.xml
    incubator/adffaces/trunk/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/Tree.xml

Modified: incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXCollection.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXCollection.java?view=diff&rev=504704&r1=504703&r2=504704
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXCollection.java
(original)
+++ incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXCollection.java
Wed Feb  7 13:41:58 2007
@@ -35,12 +35,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;
 
 
 /**
@@ -53,6 +56,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);
@@ -63,6 +71,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
@@ -368,11 +400,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.

Added: incubator/adffaces/trunk/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/Collection.xml
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/Collection.xml?view=auto&rev=504704
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/Collection.xml
(added)
+++ incubator/adffaces/trunk/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/Collection.xml
Wed Feb  7 13:41:58 2007
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+	   
+-->
+<faces-config version="1.2" xmlns="http://java.sun.com/xml/ns/javaee"
+              xmlns:tr="http://myfaces.apache.org/trinidad"
+              xmlns:xi="http://www.w3.org/2001/XInclude"
+              xmlns:mfp="http://myfaces.apache.org/maven-faces-plugin"
+              xmlns:mafp="http://myfaces.apache.org/maven-trinidad-plugin"
+              xmlns:xhtml="http://www.w3.org/1999/xhtml">
+  <component>
+    <description><![CDATA[The UIXCollection component is a base class for
+     components that do stamping.
+     This class set the EL 'var' variable correctly when the rowData changes.
+     And it wraps events that are queued, so that the correct rowData can be
+     restored on this component when the event is broadcast.]]>
+    </description>
+    <!-- Name the component type "Base" to block generation -->
+    <component-type>org.apache.myfaces.trinidad.CollectionBase</component-type>
+    <component-class>org.apache.myfaces.trinidad.component.UIXCollection</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>
+    <component-extension>
+      <mfp:component-family>org.apache.myfaces.trinidad.Collection</mfp:component-family>
+      <mfp:component-supertype>org.apache.myfaces.trinidad.ComponentBase</mfp:component-supertype>
+      <mfp:tag-class>org.apache.myfaces.trinidadinternal.taglib.UIXCollectionTag</mfp:tag-class>
+      <mfp:author>Adam Winer</mfp:author>
+      <mfp:component-class-modifier>abstract</mfp:component-class-modifier>
+      <mfp:tag-class-modifier>abstract</mfp:tag-class-modifier>
+    </component-extension>
+  </component>
+</faces-config>
+

Modified: incubator/adffaces/trunk/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/Iterator.xml
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/Iterator.xml?view=diff&rev=504704&r1=504703&r2=504704
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/Iterator.xml
(original)
+++ incubator/adffaces/trunk/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/Iterator.xml
Wed Feb  7 13:41:58 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
@@ -117,7 +103,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/trunk/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/NavigationLevel.xml
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/NavigationLevel.xml?view=diff&rev=504704&r1=504703&r2=504704
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/NavigationLevel.xml
(original)
+++ incubator/adffaces/trunk/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/NavigationLevel.xml
Wed Feb  7 13:41:58 2007
@@ -70,20 +70,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
@@ -105,7 +91,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/trunk/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/NavigationPath.xml
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/NavigationPath.xml?view=diff&rev=504704&r1=504703&r2=504704
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/NavigationPath.xml
(original)
+++ incubator/adffaces/trunk/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/NavigationPath.xml
Wed Feb  7 13:41:58 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
@@ -94,7 +80,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/trunk/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/NavigationTree.xml
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/NavigationTree.xml?view=diff&rev=504704&r1=504703&r2=504704
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/NavigationTree.xml
(original)
+++ incubator/adffaces/trunk/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/NavigationTree.xml
Wed Feb  7 13:41:58 2007
@@ -76,20 +76,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
@@ -126,7 +112,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/trunk/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/Page.xml
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/Page.xml?view=diff&rev=504704&r1=504703&r2=504704
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/Page.xml
(original)
+++ incubator/adffaces/trunk/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/Page.xml
Wed Feb  7 13:41:58 2007
@@ -60,20 +60,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
@@ -110,7 +96,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/trunk/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/Process.xml
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/Process.xml?view=diff&rev=504704&r1=504703&r2=504704
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/Process.xml
(original)
+++ incubator/adffaces/trunk/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/Process.xml
Wed Feb  7 13:41:58 2007
@@ -56,20 +56,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
@@ -91,7 +77,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/trunk/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/Tree.xml
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/Tree.xml?view=diff&rev=504704&r1=504703&r2=504704
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/Tree.xml
(original)
+++ incubator/adffaces/trunk/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/Tree.xml
Wed Feb  7 13:41:58 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
@@ -124,7 +110,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>

Added: incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/UIXCollectionTag.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/UIXCollectionTag.java?view=auto&rev=504704
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/UIXCollectionTag.java
(added)
+++ incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/UIXCollectionTag.java
Wed Feb  7 13:41:58 2007
@@ -0,0 +1,58 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ * 
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+package org.apache.myfaces.trinidadinternal.taglib;
+
+import org.apache.myfaces.trinidad.bean.FacesBean;
+import org.apache.myfaces.trinidad.component.UIXCollection;
+import org.apache.myfaces.trinidad.webapp.UIXComponentTag;
+
+/**
+ * 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
+{
+  /**
+   * Construct an instance of the UIXCollectionTag.
+   */
+  public UIXCollectionTag()
+  {
+  }
+
+  private String _var;
+  public void setVar(String var)
+  {
+    _var = var;
+  }
+
+  @Override
+  protected void setProperties(
+    FacesBean bean)
+  {
+    super.setProperties(bean);
+    setProperty(bean, UIXCollection.VAR_KEY, _var);
+  }
+
+  @Override
+  public void release()
+  {
+    super.release();
+    _var = null;
+  }
+}



Mime
View raw message