[jboss-cvs] jboss-seam/doc/reference/en/modules ...
Gavin King
gavin.king at jboss.com
Tue Jun 12 18:28:39 EDT 2007
User: gavin
Date: 07/06/12 18:28:39
Modified: doc/reference/en/modules events.xml
Log:
doc new page parameter stuff
Revision Changes Path
1.25 +53 -0 jboss-seam/doc/reference/en/modules/events.xml
(In the diff below, changes in quantity of whitespace are not shown.)
Index: events.xml
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/doc/reference/en/modules/events.xml,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -b -r1.24 -r1.25
--- events.xml 30 May 2007 03:48:06 -0000 1.24
+++ events.xml 12 Jun 2007 22:28:39 -0000 1.25
@@ -106,6 +106,18 @@
requests (for example, HTTP GET requests).
</para>
+ <para>
+ Multiple or conditional page actions my be specified using the <literal><action></literal>
+ tag:
+ </para>
+
+ <programlisting><![CDATA[<pages>
+ <page view-id="/hello.jsp">
+ <action expression="#{helloWorld.sayHello}" if="#{not validation.failed}"/>
+ <action expression="#{hitCount.increment}"/>
+ </page>
+</pages>]]></programlisting>
+
<sect3>
<title>Page parameters</title>
@@ -218,6 +230,10 @@
</page>
</pages>]]></programlisting>
+ <para>
+ Alternatively:
+ </para>
+
<programlisting><![CDATA[<pages>
<page view-id="/calculator.jsp" action="#{calculator.calculate}">
<param name="x" value="#{calculator.lhs}"/>
@@ -226,6 +242,43 @@
</page>
</pages>]]></programlisting>
+ <para>
+ JSF validators, and <literal>required="true"</literal> may
+ also be used:
+ </para>
+
+ <programlisting><![CDATA[<pages>
+ <page view-id="/blog.xhtml">
+ <param name="date"
+ value="#{blog.date}"
+ validatorId="com.my.blog.PastDate"
+ required="true"/>
+ </page>
+</pages>]]></programlisting>
+
+ <para>
+ Alternatively:
+ </para>
+
+ <programlisting><![CDATA[<pages>
+ <page view-id="/blog.xhtml">
+ <param name="date"
+ value="#{blog.date}"
+ validator="#{pastDateValidator}"
+ required="true"/>
+ </page>
+</pages>]]></programlisting>
+
+ <para>
+ Even better, model-based Hibernate validator annotations are automatically
+ recognized and validated.
+ </para>
+
+ <para>
+ When type conversion or validation fails, a global <literal>FacesMessage</literal>
+ is added to the <literal>FacesContext</literal>.
+ </para>
+
</sect3>
<sect3>
More information about the jboss-cvs-commits
mailing list