Author: artdaw
Date: 2008-08-14 04:47:00 -0400 (Thu, 14 Aug 2008)
New Revision: 10085
Modified:
trunk/docs/userguide/en/src/main/docbook/included/graphValidator.desc.xml
trunk/docs/userguide/en/src/main/docbook/included/graphValidator.xml
Log:
https://jira.jboss.org/jira/browse/RF-3903
Added info about graphValidator
Modified: trunk/docs/userguide/en/src/main/docbook/included/graphValidator.desc.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/graphValidator.desc.xml 2008-08-14
08:46:44 UTC (rev 10084)
+++ trunk/docs/userguide/en/src/main/docbook/included/graphValidator.desc.xml 2008-08-14
08:47:00 UTC (rev 10085)
@@ -9,7 +9,7 @@
<title>Description</title>
<para>The<emphasis role="bold">
<property><rich:ajaxGraph></property>
- </emphasis>is a component designed to provide ajax validation inside for
JSF inputs.</para>
+ </emphasis>component allows to register Hibernate Validators for multiple
input components.</para>
</section>
<section>
Modified: trunk/docs/userguide/en/src/main/docbook/included/graphValidator.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/graphValidator.xml 2008-08-14
08:46:44 UTC (rev 10084)
+++ trunk/docs/userguide/en/src/main/docbook/included/graphValidator.xml 2008-08-14
08:47:00 UTC (rev 10085)
@@ -81,7 +81,57 @@
HtmlgraphValidator mygraphValidator= new HtmlgraphValidator();
...
]]></programlisting>
+
+
</section>
+
+ <para> The<emphasis role="bold">
+
<property><rich:graphValidator></property></emphasis>component
behaves basically the same way as the <emphasis role="bold">
+ <property><rich:beanValidator></property></emphasis>
+ The deference between these two components is that in order to validate some input
data with a <emphasis role="bold">
+
<property><rich:beanValidator></property></emphasis>
component, it should be a nested element of an input component, whereas <emphasis
role="bold">
+
<property><rich:graphValidator></property></emphasis>
wraps multiple input components and validates the data received from them.
+ </para>
+ <para>The following example demonstrate a pattern of how the <emphasis
role="bold">
+ <property><rich:graphValidator></property></emphasis>
can be used.</para>
+ <programlisting role="XML"><![CDATA[...
+ <rich:graphValidator>
+ <h:panelGrid columns="3">
+ <h:outputText value="Name:" />
+ <h:inputText value="#{validationBean.name}"
id="name">
+ <f:validateLength minimum="2" />
+ </h:inputText>
+ <rich:message for="name" />
+ <h:outputText value="Email:" />
+ <h:inputText value="#{validationBean.email}"
id="email" />
+ <rich:message for="email" />
+ </h:panelGrid>
+ </rich:graphValidator>
+ ...
+]]></programlisting>
+
+ <para>The data validation can be also performed using Hibernate Validator, the
same way as it is done with <emphasis role="bold">
+ <property><rich:beanValidator></property></emphasis>.
</para>
+
+
+ <para>The components's architecture provides an option to bind the
component to a managed bean, which is done with the <emphasis >
+ <property><value></property></emphasis> attribute.
The attribute ensures that the entered data is valid after the model is updated by
revalidating the bean properties.</para>
+ <para>Please look at the example below.</para>
+
+
+ <programlisting role="XML"><![CDATA[...
+ <rich:graphValidator value="#{dayStatistics}">
+ <h:outputText value="#{pt.title}" /><
+ <rich:inputNumberSpinne minValue="0" maxValue="24"
value="#{pt.time}" id="time">
+ </rich:inputNumberSpinner>
+ <rich:message for="time" />
+</rich:graphValidator>
+ ...
+]]></programlisting>
+
+
+</section>
+