From richfaces-svn-commits at lists.jboss.org Tue Aug 12 13:56:01 2008 Content-Type: multipart/mixed; boundary="===============6476785697536498694==" MIME-Version: 1.0 From: richfaces-svn-commits at lists.jboss.org To: richfaces-svn-commits at lists.jboss.org Subject: [richfaces-svn-commits] JBoss Rich Faces SVN: r10057 - trunk/docs/userguide/en/src/main/docbook/included. Date: Tue, 12 Aug 2008 13:56:01 -0400 Message-ID: --===============6476785697536498694== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: artdaw Date: 2008-08-12 13:56:00 -0400 (Tue, 12 Aug 2008) New Revision: 10057 Modified: trunk/docs/userguide/en/src/main/docbook/included/beanValidator.desc.xml trunk/docs/userguide/en/src/main/docbook/included/beanValidator.xml Log: https://jira.jboss.org/jira/browse/RF-3903 The info about beanValidator is added Modified: trunk/docs/userguide/en/src/main/docbook/included/beanValidator.d= esc.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/docs/userguide/en/src/main/docbook/included/beanValidator.desc.xm= l 2008-08-12 17:38:30 UTC (rev 10056) +++ trunk/docs/userguide/en/src/main/docbook/included/beanValidator.desc.xm= l 2008-08-12 17:56:00 UTC (rev 10057) @@ -9,16 +9,16 @@ Description The <rich:beanValidator> = - is a component designed to provide ajax validation insi= de for JSF inputs. + is a component designed to provide validation using Hib= ernate model-based constraints = + + +
Key Features - Skips all JSF processing except validation - Possibility to use both standard and custom va= lidation - Possibility to use Hibernate Validation= - Event based validation triggering + Validation using Hibernate constraints<= /listitem>
Modified: trunk/docs/userguide/en/src/main/docbook/included/beanValidator.x= ml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/docs/userguide/en/src/main/docbook/included/beanValidator.xml 200= 8-08-12 17:38:30 UTC (rev 10056) +++ trunk/docs/userguide/en/src/main/docbook/included/beanValidator.xml 200= 8-08-12 17:56:00 UTC (rev 10057) @@ -55,18 +55,16 @@
Creating the Component with a Page Tag = - To create the simplest variant on a page use the following synta= x: + To create the simplest variant of the component on a page use th= e following syntax: = = Example: - - - - + + + ...]]>
= @@ -81,6 +79,119 @@ HtmlbeanValidator mybeanValidator=3D new HtmlbeanValidator(); ... ]]> + = + = + +
+ Details of Usage + = + = + Starting from 3.2.2 GA version Rich Faces provides support for model-base= d constraints defined using Hibernate Validator. = + Thus it's possible to use Hibernate Validators the same as for Seam based= applications. + + = + The <rich:beanValidator> + component is defined in the same way as any JSF validator. Look at = the example below. = + = + = + + + + + + + + + + + + + + + + + + + + + + + + + + ...]]> = + = + Please play close attention on the bean code that contains th= e constraints + defined with Hibernate annotation which perform validation of the in= put data. + = + + = +The following figure shows what happens if validation fails = + = +
+ <emphasis role=3D"bold"><property><rich:beanValidator>= ;</property></emphasis> usage = + + + + + = +
= + As you can see from the example that in order to validate the= <rich:beanValidator> + should be nested into a input JSF or RichFaces component. = + + = + The component has the only attribute - &qu= ot;summary"which displays validation messages ab= out validation errors. +
= = --===============6476785697536498694==--