[richfaces-svn-commits] JBoss Rich Faces SVN: r4910 - branches/3.1.x/docs/userguide/en/src/main/docbook/included.
richfaces-svn-commits at lists.jboss.org
richfaces-svn-commits at lists.jboss.org
Wed Dec 19 05:37:58 EST 2007
Author: artdaw
Date: 2007-12-19 05:37:58 -0500 (Wed, 19 Dec 2007)
New Revision: 4910
Modified:
branches/3.1.x/docs/userguide/en/src/main/docbook/included/listShuttle.xml
Log:
http://jira.jboss.com/jira/browse/RF-1174 - edit Details of Usage, add example
Modified: branches/3.1.x/docs/userguide/en/src/main/docbook/included/listShuttle.xml
===================================================================
--- branches/3.1.x/docs/userguide/en/src/main/docbook/included/listShuttle.xml 2007-12-19 01:55:25 UTC (rev 4909)
+++ branches/3.1.x/docs/userguide/en/src/main/docbook/included/listShuttle.xml 2007-12-19 10:37:58 UTC (rev 4910)
@@ -14,17 +14,11 @@
</para>
<programlisting role="XML"><![CDATA[...
<rich:listShuttle var="item" sourceValue="#{bean.source}" targetValue="#{bean.target}" converter="listShuttleconverter">
- <f:facet name="sourceCaption">
- <h:outputText value="Cars Store #1" />
- </f:facet>
- <f:facet name="targetCaption">
- <h:outputText value="Cars Store #2" />
- </f:facet>
<h:column>
- <f:facet name="header">
- <h:outputText value="Cars" />
- </f:facet>
- <h:outputText value="#{item.name}" />
+ <f:facet name="header">
+ <h:outputText value="Cars" />
+ </f:facet>
+ <h:outputText value="#{item.name}" />
</h:column>
</rich:listShuttle>
...]]></programlisting>
@@ -49,16 +43,16 @@
<listitem>optional <property>caption</property> element</listitem>
<listitem><property>optional ordering controls set</property> is a set of controls
that performs reordering</listitem>
- <listitem><property>copy/moving controls set</property> is a set of controls, which
- performs moving/copying items between lists</listitem>
+ <listitem><property>move controls set</property> is a set of controls, which
+ performs moving items between lists</listitem>
</itemizedlist>
</para>
<para> The <emphasis>
<property>"sourceValue" </property>
- </emphasis> attribute defines the collection to be shown in source list.</para>
+ </emphasis> attribute defines the collection to be shown in the source list.</para>
<para>The <emphasis>
<property>"targetValue" </property>
- </emphasis> attribute defines the collection to store the value from target list.</para>
+ </emphasis> attribute defines the collection to be shown in the target list.</para>
<para> The <emphasis>
<property>"var" </property>
</emphasis> could be shared between both collections to defined lists on the page.</para>
@@ -68,6 +62,14 @@
</emphasis> attribute is used to convert component data to a particular component's value.
For example, when you select items in a list, a converter is used to format a set of objects to a strings to be displayed.
</para>
+ <para>
+ The <emphasis>
+ <property>"sourceSelection" </property>
+ </emphasis> attribute stores the collection of items selected by user in the source list.
+ The <emphasis>
+ <property>"targetSelection" </property>
+ </emphasis> attribute stores the collection of items selected by user in the target list.
+ </para>
<para>Captions could be added to a list only after it was defined as a <emphasis>
<property>"sourceCaption"</property>
</emphasis> and <emphasis>
@@ -76,7 +78,22 @@
<property>"sourceCaptionLabel"</property>
</emphasis> and <emphasis>
<property>"targetCaptionLabel"</property>
- </emphasis> attribute.</para>
+ </emphasis> attribute.
+ </para>
+ <programlisting role="XML"><![CDATA[...
+<rich:listShuttle var="item" sourceValue="#{bean.source}" targetValue="#{bean.target}" sourceSelection="#{bean.sourceSelection}"
+ targetSelection="#{bean.targetSelection}" converter="listShuttleconverter">
+ <f:facet name="sourceCaption">
+ <h:outputText value="Cars Store #1" />
+ </f:facet>
+ <f:facet name="targetCaption">
+ <h:outputText value="Cars Store #2" />
+ </f:facet>
+ <rich:column>
+ <h:outputText value="#{items.name}" />
+ </rich:column>
+</rich:listShuttle>
+...]]></programlisting>
<!-- ordering control set-->
<para>The <emphasis role="bold">
<property><rich:listShuttle></property>
@@ -110,20 +127,19 @@
<emphasis role="bold">Example:</emphasis>
</para>
<programlisting role="XML"><![CDATA[...
-<rich:listShuttle var="item" sourceValue="#{bean.source}" targetValue="#{bean.target}" sourceSelection="#{bean.sourceSelection}" targetSelection="#{bean.targetSelection}"
- converter="listShuttleconverter">
+<rich:listShuttle var="item" sourceValue="#{bean.source}" targetValue="#{bean.target}" converter="listShuttleconverter">
...
<f:facet name="topControl">
- <h:outputText value="Move to top" />
+ <h:outputText value="Move to top" />
</f:facet>
<f:facet name="upControl">
- <h:outputText value="Move up" />
+ <h:outputText value="Move up" />
</f:facet>
<f:facet name="downControl">
- <h:outputText value="Move down" />
+ <h:outputText value="Move down" />
</f:facet>
<f:facet name="bottomControl">
- <h:outputText value="Move to bottom" />
+ <h:outputText value="Move to bottom" />
</f:facet>
<rich:orderingList>
...
@@ -133,11 +149,10 @@
<para>The <emphasis role="bold">
<property><rich:listShuttle></property>
- </emphasis>component also provides 4 predefined controls in <property>move/copy
- controls set</property> for moving or copying items between source and target lists.
+ </emphasis>component also provides 4 predefined controls in <property>move
+ controls set</property> for moving items between source and target lists.
Every control has possibility to be disabled. </para>
- <para>A <property>move/copy
- controls set</property> could be defined with
+ <para>A <property>move controls set</property> could be defined with
<emphasis><property>"copyControlLabel"</property></emphasis>, <emphasis><property>"removeControlLabel"</property></emphasis>,
<emphasis><property>"copyAllControlLabel"</property></emphasis>, <emphasis><property>"removeAllControlLabel"</property></emphasis>attributes.
</para>
@@ -156,6 +171,19 @@
</emphasis>
facets in order to replace the default controls with facets content.
</para>
+ <programlisting role="XML"><![CDATA[...
+<rich:listShuttle var="item" sourceValue="#{bean.source}" targetValue="#{bean.target}" converter="listShuttleconverter"
+ copyControlLabel="Copy" removeControlLabel="Remove"
+ copyAllControlLabel="Copy all" removeAllControlLabel="Remove all">
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="Cars" />
+ </f:facet>
+ <h:outputText value="#{item.name}" />
+ </h:column>
+<rich:orderingList>
+...
+]]></programlisting>
<!-- The following facets currently do not work-->
<!--<emphasis>
More information about the richfaces-svn-commits
mailing list