Author: artdaw
Date: 2008-05-02 09:38:02 -0400 (Fri, 02 May 2008)
New Revision: 8402
Added:
trunk/docs/userguide/en/src/main/resources/images/listShuttle_validation.png
Modified:
trunk/docs/userguide/en/src/main/docbook/included/listShuttle.xml
Log:
http://jira.jboss.com/jira/browse/RF-2204 - info about source and target values validation
added into Guide.
Modified: trunk/docs/userguide/en/src/main/docbook/included/listShuttle.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/listShuttle.xml 2008-05-02 12:43:11
UTC (rev 8401)
+++ trunk/docs/userguide/en/src/main/docbook/included/listShuttle.xml 2008-05-02 13:38:02
UTC (rev 8402)
@@ -56,7 +56,54 @@
<para> The <emphasis>
<property>"var" </property>
</emphasis> attribute could be shared between both Lists or Arrays to
define lists on the page.</para>
+
<para>
+ The
<emphasis><property>"sourceRequired"</property></emphasis>
and
+
<emphasis><property>"targetRequired"</property></emphasis>
attributes define the case when
+ source and target values are being validated. If the value of both attributes
is "true"
+ there should be at least one item in source and target lists. Otherwise
validation fails.
+ </para>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="XML"><![CDATA[...
+<h:form id="myForm">
+ <rich:messages>
+ <f:facet name="header">
+ <h:outputText value="Entered Data Status:" />
+ </f:facet>
+ <f:facet name="errorMarker">
+ <h:graphicImage value="/images/ajax/error.gif" />
+ </f:facet>
+ </rich:messages>
+ <rich:listShuttle id="myListShuttle"
sourceValue="#{toolBar.freeItems}" targetValue="#{toolBar.items}"
+ sourceRequired = "true" targetRequired =
"true" var="items" converter="listShuttleconverter"
+ sourceCaptionLabel="Source List"
targetCaptionLabel="Target List">
+ <rich:column>
+ <h:graphicImage value="#{items.iconURI}" />
+ </rich:column>
+ <rich:column>
+ <h:outputText value="#{items.label}" />
+ </rich:column>
+ </rich:listShuttle>
+ <a4j:commandButton value="Submit" />
+</h:form>
+...]]></programlisting>
+ <para>
+ In the example above the source list is empty. If you submit the form
validation fails and error message appears on a page.
+ </para>
+ <para>
+ This is the result:
+ </para>
+ <figure>
+ <title>Style classes</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/listShuttle_validation.png"
/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>
The <emphasis>
<property>"converter" </property>
</emphasis> attribute is used to convert component data to a particular
component's value.
Added: trunk/docs/userguide/en/src/main/resources/images/listShuttle_validation.png
===================================================================
(Binary files differ)
Property changes on:
trunk/docs/userguide/en/src/main/resources/images/listShuttle_validation.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream