incubator-adffaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject svn commit: r490344 - /incubator/adffaces/trunk/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/Iterator.xml
Date Tue, 26 Dec 2006 18:00:23 GMT
Author: awiner
Date: Tue Dec 26 10:00:23 2006
New Revision: 490344

Improve docs for iterator (ADFFACES-334, plus a bunch more)


Modified: 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/Iterator.xml
+++ incubator/adffaces/trunk/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/Iterator.xml
Tue Dec 26 10:00:23 2006
@@ -21,7 +21,12 @@
-    <description><![CDATA[UIXIterator is a component that does iteration.]]></description>
+    <description><![CDATA[UIXIterator is a component that performs iteration
+over its child components.  It is like a UIXTable without any chrome.
+While functionally similar to a forEach tag, an iterator is a component
+that does its processing during rendering, while forEach runs during
+the assembly of the component tree, and doesn't leave behind a component in the
+heirarchy. ]]></description>
@@ -112,22 +117,47 @@
-      <mfp:long-description><![CDATA[UIXIterator is a component that does iteration.
It is similar to UIXTable
+      <mfp:long-description><![CDATA[<p>UIXIterator is a component that performs
iteration over its child components. It is similar to UIXTable
 but has no chrome.
  Each child is repeatedly stamped as many times as necessary.
  Iteration is done starting at the index given by the &quot;first&quot; attribute,
  for as many indices as specified by the &quot;rows&quot; attribute.
  If &quot;rows&quot; returns 0, then the iteration continues until 
  there are no more elements in the underlying data.
- <html:br/>
+ </p>
+ <p> 
   While the &lt;tr:forEach&gt;
 will be sufficient for most user's needs, it does not work with a JSF
 DataModel, or CollectionModel. It also cannot be bound to EL expressions that
 use component-managed EL variables
-(such as the &quot;var&quot; variable on an &lt;tr:table&gt;).
+(such as the &quot;var&quot; variable on an &lt;tr:table&gt;), because
+a forEach tag runs during
 The &lt;tr:iterator&gt; tag was created to
-address these issues.]]>
+address these issues.
+To list all, the benefits of UIXIterator over forEach:
+<li>Access to component-managed EL variables</li>
+<li>Full support for CollectionModel and DataModel</li>
+<li>Does not require creating multiple copies of children,
+so more memory efficient</li>
+<li>Much better at dealing with adding and deleting children,
+at least when used with a CollectionModel with a good
+implementation of getRowKey()</li>
+<li>Supports "binding", and all other forms of JSF component
+and the negative aspects:
+<li>Leaves behind a component in the hierarchy, which causes
+problems with components like panelFormLayout that try to handle each child
+<li>Because there's only one of each child, the same limitations
+on "binding", etc., as apply inside a table also apply to iterator.</li>
       <mfp:author>Arjuna Wijeyekoon</mfp:author>

View raw message