Author: SeanRogers
Date: 2010-02-14 23:02:44 -0500 (Sun, 14 Feb 2010)
New Revision: 16450
Modified:
root/docs/trunk/Developer_Guide/en-US/chap-Developer_Guide-Advanced_features.xml
root/docs/trunk/Developer_Guide/en-US/chap-Developer_Guide-Basic_concepts.xml
root/docs/trunk/Developer_Guide/en-US/chap-Developer_Guide-Getting_started_with_RichFaces.xml
root/docs/trunk/Developer_Guide/en-US/chap-Developer_Guide-RichFaces_overview.xml
root/docs/trunk/Developer_Guide/pom.xml
Log:
Fixed code rendering errors
Modified:
root/docs/trunk/Developer_Guide/en-US/chap-Developer_Guide-Advanced_features.xml
===================================================================
---
root/docs/trunk/Developer_Guide/en-US/chap-Developer_Guide-Advanced_features.xml 2010-02-14
18:06:20 UTC (rev 16449)
+++
root/docs/trunk/Developer_Guide/en-US/chap-Developer_Guide-Advanced_features.xml 2010-02-15
04:02:44 UTC (rev 16450)
@@ -40,19 +40,11 @@
RichFaces uses a filter to correct the code received on an Ajax request. During a
regular JSF request, a browser makes corrections independently. For Ajax requests, a
filter is needed to prevent layout destruction. This is because a received code could
differ from a code validated by a browser, and a browser does not make any corrections.
Refer to <xref linkend="sect-Developer_Guide-Architecture-Ajax_Filter" />
for further details on how the Ajax filter works.
</para>
<para>
- <xref linkend="exam-Developer_guide-Advanced_features-Example_filter"
/> shows how to set a filter in the <filename>web.xml</filename> file of an
application.
+ <xref linkend="exam-Developer_Guide-Advanced_features-Example_filter"
/> shows how to set a filter in the <filename>web.xml</filename> file of an
application.
</para>
- <example id="exam-Developer_guide-Advanced_features-Example_filter">
+ <example id="exam-Developer_Guide-Advanced_features-Example_filter">
<title>Example filter</title>
-<programlisting language="XML" role="XML">
-...
-<filter>
- <display-name>RichFaces Filter</display-name>
- <filter-name>richfaces</filter-name>
- <filter-class>org.ajax4jsf.Filter</filter-class>
-</filter>
-...
-</programlisting>
+<programlisting language="XML" role="XML"><xi:include
parse="text"
href="extras/exam-Developer_Guide-Advanced_features-Example_filter.xml_sample"
xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting>
</example>
<para>
Different types of filters can be configured for pages in the same application. There
are three filter types:
@@ -88,9 +80,7 @@
</para>
<example
id="exam-Developer_Guide-Advanced_features-Example_filter_configuration">
<title>Example filter configuration</title>
-<programlisting language="XML" role="XML">
-<xi:include parse="text"
href="extras/exam-Developer_Guide-Advanced_features-Example_filter_configuration.xml_sample"
xmlns:xi="http://www.w3.org/2001/XInclude" />
-</programlisting>
+<programlisting language="XML" role="XML"><xi:include
parse="text"
href="extras/exam-Developer_Guide-Advanced_features-Example_filter_configuration.xml_sample"
xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting>
</example>
<para>
The <parameter>ORDER</parameter> parameter specifies the order in which
particular filter types are used for code correction: first
<literal>NONE</literal>, then <literal>NEKO</literal>, then
<literal>TIDY</literal>. Two sets of pages are specified as using specific
filter types:
@@ -120,19 +110,16 @@
<para>
Scripts and styles are normally loaded into a RichFaces application on demand. The
default loading strategy can be altered to suit certain applications by specifying the
strategy in the <filename>web.xml</filename> file.
</para>
- <formalpara>
+ <section>
<title><code>org.richfaces.LoadScriptStrategy</code></title>
<para>
The script-loading strategy is specified as follows:
-<programlisting language="XML" role="XML">
-...
-<context-param>
+ </para>
+<programlisting language="XML"
role="XML"><context-param>
<param-name>org.richfaces.LoadScriptStrategy</param-name>
<param-value>ALL</param-value>
</context-param>
-...
</programlisting>
- </para>
<para>
The <sgmltag><param-value></sgmltag> element can be set to
one of three values:
<variablelist>
@@ -168,20 +155,17 @@
</varlistentry>
</variablelist>
</para>
- </formalpara>
- <formalpara>
+ </section>
+ <section>
<title><code>org.richfaces.LoadStyleStrategy</code></title>
<para>
The style-loading strategy is specified as follows:
-<programlisting language="XML" role="XML">
-...
-<context-param>
+ </para>
+<programlisting language="XML"
role="XML"><context-param>
<param-name>org.richfaces.LoadStyleStrategy</param-name>
<param-value>ALL</param-value>
</context-param>
-...
</programlisting>
- </para>
<para>
The <sgmltag><param-value></sgmltag> element can be set to
one of three values:
<variablelist>
@@ -211,7 +195,7 @@
</varlistentry>
</variablelist>
</para>
- </formalpara>
+ </section>
</section>
<section id="sect-Developer_Guide-Advanced_features-Error_handling">
@@ -221,25 +205,22 @@
</para>
<para>
To define handlers for application exceptions, add the following code to your
<filename>web.xml</filename> file:
-<programlisting language="XML" role="XML">
-<context-param>
+ </para>
+<programlisting language="XML"
role="XML"><context-param>
<param-name>org.ajax4jsf.handleViewExpiredOnClient</param-name>
<param-value>true</param-value>
</context-param>
</programlisting>
- </para>
<section
id="sect-Developer_Guide-Advanced_features-Handling_request_errors">
<title>Handling request errors</title>
<para>
To execute custom JavaScript code on the client when an error occurs during an Ajax
request, redefine the standard <methodname>A4J.AJAX.onError</methodname>
method, as shown in <xref
linkend="exam-Developer_Guide-Advanced_features-Example_request_error" />.
- <example
id="exam-Developer_Guide-Advanced_features-Example_request_error">
- <title>Example request error</title>
-<programlisting language="Java" role="JAVA">
-A4J.AJAX.onError = function(req, status, message){
- window.alert("Custom onError handler "+message);
-}
-</programlisting>
- </example>
+ </para>
+ <example
id="exam-Developer_Guide-Advanced_features-Example_request_error">
+ <title>Example request error</title>
+<programlisting language="Java" role="JAVA"><xi:include
parse="text"
href="extras/exam-Developer_Guide-Advanced_features-Example_request_error.js"
xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting>
+ </example>
+ <para>
The function accepts three parameters:
<variablelist>
<varlistentry>
@@ -273,18 +254,13 @@
<title>Handling session expiration errors</title>
<para>
Redefine the <methodname>A4J.AJAX.onExpired</methodname> method to handle
the expiration of a user's session, as shown in <xref
linkend="exam-Developer_Guide-Advanced_features-Example_session_expiration_error"
/>.
- <example
id="exam-Developer_Guide-Advanced_features-Example_session_expiration_error">
- <title>Example session expiration error</title>
-<programlisting language="Java" role="JAVA">
-A4J.AJAX.onExpired = function(loc, expiredMsg){
- if(window.confirm("Custom onExpired handler "+expiredMsg+" for a
location: "+loc)){
- return loc;
- } else {
- return false;
- }
-}
+ </para>
+ <example
id="exam-Developer_Guide-Advanced_features-Example_session_expiration_error">
+ <title>Example session expiration error</title>
+<programlisting language="Java" role="JAVA"><xi:include
parse="text"
href="extras/exam-Developer_Guide-Advanced_features-Example_session_expiration_error.js"
xmlns:xi="http://www.w3.org/2001/XInclude" />
</programlisting>
- </example>
+ </example>
+ <para>
The function accepts two parameters:
<variablelist>
<varlistentry>
@@ -310,13 +286,12 @@
<title>MyFaces compatibility</title>
<para>
Custom error handlers for the <methodname>onError</methodname> and
<methodname>onExpire</methodname> events do not work under MyFaces. MyFaces
handles exceptions through its internal debug page. Use the following code in the
<filename>web.xml</filename> file to prevent this behavior in MyFaces:
-<programlisting language="XML" role="XML">
-<context-param>
+ </para>
+<programlisting language="XML"
role="XML"><context-param>
<param-name>org.apache.myfaces.ERROR_HANDLING</param-name>
<param-value>false</param-value>
</context-param>
</programlisting>
- </para>
</note>
</section>
@@ -325,6 +300,9 @@
<para>
JavaServer Faces (<acronym>JSF</acronym>) has an advanced navigation
mechanism that allows you to define navigation from one view to another. Navigation
typically happens in a web application when a user moves from one page to another, but
there is no switch mechanism between certain logical states in the same view. The
RichFaces State API allows sets of states to be defined for the views, as well as any
properties associated with these states.
</para>
+ <para>
+ Actually States is a map where the entry key is a name of the State and the value is a
State map. Particular State map has entries with some names as keys and any objects as
values that are used after the state activation. Thus, in the State map you could define
any values, method bindings, or just some simple state variables (constants) which have
different values for every State.
+ </para>
</section>
<section id="sect-Developer_Guide-Advanced_features-User_roles">
@@ -336,35 +314,29 @@
<title>User role example</title>
<para>
Certain controls only need to be rendered for administrators.
- <procedure>
- <step>
- <title>Create <literal>admin</literal> role</title>
- <para>
- Create the <literal>admin</literal> role in the
<filename>web.xml</filename> file:
-<programlisting language="XML" role="XML">
-<security-role>
- <role-name>admin</role-name>
-</security-role>
-</programlisting>
- </para>
- </step>
- <step>
- <title>Implement authorization for users</title>
- <para>
- Assign the <literal>admin</literal> role to users when they log in to
the application as administrators.
- </para>
- </step>
- <step>
- <title>Use the <function>rich:isUserInRole(Object)</function>
function</title>
- <para>
- The <function>rich:isUserInRole(Object)</function> function can be
used with the <varname>rendered</varname> attribute of any component:
-<programlisting language="XML" role="XML">
-<rich:editor value="#{bean.text}"
rendered="#{rich:isUserInRole('admin')}" />
-</programlisting>
- </para>
- </step>
- </procedure>
</para>
+ <procedure>
+ <step>
+ <title>Create <literal>admin</literal> role</title>
+ <para>
+ Create the <literal>admin</literal> role in the
<filename>web.xml</filename> file:
+ </para>
+<programlisting language="XML" role="XML"><xi:include
parse="text"
href="extras/exam-Developer_Guide-Advanced_features-User_role_example-0.xml_sample"
xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting>
+ </step>
+ <step>
+ <title>Implement authorization for users</title>
+ <para>
+ Assign the <literal>admin</literal> role to users when they log in to
the application as administrators.
+ </para>
+ </step>
+ <step>
+ <title>Use the <function>rich:isUserInRole(Object)</function>
function</title>
+ <para>
+ The <function>rich:isUserInRole(Object)</function> function can be used
with the <varname>rendered</varname> attribute of any component:
+ </para>
+<programlisting language="XML" role="XML"><xi:include
parse="text"
href="extras/exam-Developer_Guide-Advanced_features-User_role_example-1.xml_sample"
xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting>
+ </step>
+ </procedure>
</example>
</section>
Modified: root/docs/trunk/Developer_Guide/en-US/chap-Developer_Guide-Basic_concepts.xml
===================================================================
---
root/docs/trunk/Developer_Guide/en-US/chap-Developer_Guide-Basic_concepts.xml 2010-02-14
18:06:20 UTC (rev 16449)
+++
root/docs/trunk/Developer_Guide/en-US/chap-Developer_Guide-Basic_concepts.xml 2010-02-15
04:02:44 UTC (rev 16450)
@@ -29,7 +29,7 @@
</listitem>
<listitem>
<para>
- Most components in the <lassname>rich</lassname> tag library have
built-in Ajax support. Refer to the <citetitle>RichFaces Component
Reference</citetitle> for details on the use of each component.
+ Most components in the <classname>rich</classname> tag library have
built-in Ajax support. Refer to the <citetitle>RichFaces Component
Reference</citetitle> for details on the use of each component.
</para>
</listitem>
</itemizedlist>
Modified:
root/docs/trunk/Developer_Guide/en-US/chap-Developer_Guide-Getting_started_with_RichFaces.xml
===================================================================
---
root/docs/trunk/Developer_Guide/en-US/chap-Developer_Guide-Getting_started_with_RichFaces.xml 2010-02-14
18:06:20 UTC (rev 16449)
+++
root/docs/trunk/Developer_Guide/en-US/chap-Developer_Guide-Getting_started_with_RichFaces.xml 2010-02-15
04:02:44 UTC (rev 16450)
@@ -265,32 +265,15 @@
<step
id="step-Developer_Guide-Creating_a_project-Reference_the_tag_libraries">
<title>Reference the tag libraries</title>
<para>
- The RichFaces tag libraries need to be referenced on each JSP and XHTML page in your
project.
+ The RichFaces tag libraries need to be referenced on each XHTML page in your
project:
</para>
- <variablelist>
- <varlistentry>
- <term>Referencing in JSP pages</term>
- <listitem>
-
-<programlisting language="XML" role="XML"><%@ taglib
uri="http://richfaces.org/a4j" prefix="a4j"%>
-<%@ taglib
uri="http://richfaces.org/rich"
prefix="rich"%>
-</programlisting>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>Referencing in XHTML pages</term>
- <listitem>
-
<programlisting language="XML"
role="XML"><ui:composition
xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich">
- ...
+ ...
</ui:composition>
</programlisting>
- </listitem>
- </varlistentry>
- </variablelist>
</step>
</procedure>
@@ -308,50 +291,50 @@
<step
id="step-Developer_Guide-Using_RichFaces_with_Maven-Add_required_repositories">
<title>Add required repositories</title>
<para>
- A structure for the Maven project with minimal content can be created with the Maven
archetype named <filename>maven-archetype-jsfwebapp</filename> included as
part of the RichFaces Component Development Kit (<acronym>CDK</acronym>). The
archetype and the project itself require extra repositories to be provided, namely
<
filename>http://snapshots.jboss.org/maven2/</filename> and
<
filename>http://repository.jboss.com/maven2/</filename>. To make the
repositories accessible to Maven, add a profile in the
<filename>maven_installation_folder/conf/settings.xml</filename> file under
the <sgmltag><profiles></sgmltag> element:
+ A structure for the Maven project with minimal content can be created with the Maven
archetype named <filename>maven-archetype-jsfwebapp</filename> included as
part of the RichFaces Component Development Kit (<acronym>CDK</acronym>). The
archetype and the project itself require extra repositories to be provided, namely
<
filename>http://snapshots.jboss.org/maven2/</filename> and
<
filename>http://repository.jboss.com/maven2/</filename>. To make the
repositories accessible to Maven, add a profile in the
<filename>maven_installation_folder/conf/settings.xml</filename> file under
the <sgmltag><profiles></sgmltag> element:
+ </para>
<programlisting language="XML"
role="XML"><profiles>
- <profile>
- <id>jsf-app-profile</id>
- <repositories>
- <repository>
- <releases>
- <enabled>true</enabled>
- </releases>
- <snapshots>
- <enabled>true</enabled>
- <updatePolicy>always</updatePolicy>
- </snapshots>
- <id>snapshots.jboss.org</id>
- <name>Snapshot Jboss Repository for Maven</name>
- <url>http://snapshots.jboss.org/maven2/</url>
- <layout>default</layout>
- </repository>
- <repository>
- <releases>
- <enabled>true</enabled>
- </releases>
- <snapshots>
- <enabled>true</enabled>
- <updatePolicy>always</updatePolicy>
- </snapshots>
- <id>repository.jboss.com</id>
- <name>Jboss Repository for Maven</name>
- <url>http://repository.jboss.com/maven2/</url>
- <layout>default</layout>
- </repository>
- </repositories>
- </profile>
- ...
+ <profile>
+ <id>jsf-app-profile</id>
+ <repositories>
+ <repository>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ <snapshots>
+ <enabled>true</enabled>
+ <updatePolicy>always</updatePolicy>
+ </snapshots>
+ <id>snapshots.jboss.org</id>
+ <name>Snapshot Jboss Repository for
Maven</name>
+
<url>http://snapshots.jboss.org/maven2/</url>
+ <layout>default</layout>
+ </repository>
+ <repository>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ <snapshots>
+ <enabled>true</enabled>
+ <updatePolicy>always</updatePolicy>
+ </snapshots>
+ <id>repository.jboss.com</id>
+ <name>Jboss Repository for Maven</name>
+
<url>http://repository.jboss.com/maven2/</url>
+ <layout>default</layout>
+ </repository>
+ </repositories>
+ </profile>
+ ...
</profiles>
</programlisting>
- </para>
<para>
- The profile then needs to be activated in the
<sgmltag><activeProfiles></sgmltag> element:
+ The profile then needs to be activated in the
<sgmltag><activeProfiles></sgmltag> element:
+ </para>
<programlisting language="XML"
role="XML"><activeProfiles>
<activeProfile>jsf-app-profile</activeProfile>
</activeProfiles>
</programlisting>
- </para>
</step>
<step
id="step-Developer_Guide-Using_RichFaces_with_Maven-Generate_project_from_archetype">
<title>Generate project from archetype</title>
@@ -398,9 +381,8 @@
│ ├── WEB-INF
│ │ ├── faces-config.xml
│ │ └── web.xml
- │ ├── index.jsp
+ │ ├── index.xhtml
│ └── pages
- │ ├── index.jsp
│ └── index.xhtml
└── test
└── java
@@ -412,9 +394,10 @@
</para>
</step>
<step>
- <title></title>
+ <title>Add dependencies</title>
<para>
- The <filename>jsf-app</filename> directory contains a project descriptor
file, <filename>pom.xml</filename>. To add RichFaces libraries to your
project, edit the project descriptor to add dependencies to the
<sgmltag><dependencies></sgmltag> element as follows:
+ The <filename>jsf-app</filename> directory contains a project descriptor
file, <filename>pom.xml</filename>. To add RichFaces libraries to your
project, edit the project descriptor to add dependencies to the
<sgmltag><dependencies></sgmltag> element as follows:
+ </para>
<programlisting language="XML"
role="XML"><dependencies>
<dependency>
<groupId>junit</groupId>
@@ -490,7 +473,6 @@
</dependency>
</dependencies>
</programlisting>
- </para>
</step>
<step
id="step-Developer_Guide-Using_RichFaces_with_Maven-Build_the_project">
<title>Build the project</title>
@@ -505,14 +487,14 @@
</para>
</step>
<step
id="step-Developer_Guide-Build_the_project-Building_for_Eclipse_and_JBoss_Tools">
- <title>Building for <program>Eclipse</program> and
<program>JBoss Tools</program></title>
+ <title>Building for <application>Eclipse</application> and
<application>JBoss Tools</application></title>
<para>
- To build the project for <program>Eclipse</program> and
<program>JBoss Tools</program>, enter the following command at the command
line:
+ To build the project for <application>Eclipse</application> and
<application>JBoss Tools</application>, enter the following command at the
command line:
<screen>mvn eclipse:eclipse -Dwtpversion=2.0
</screen>
</para>
<para>
- The <computeroutput>BUILD SUCCESSFUL</computeroutput> message
indicates the project has been assembled and is ready to import into
<program>Eclipse</program>.
+ The <computeroutput>BUILD SUCCESSFUL</computeroutput> message
indicates the project has been assembled and is ready to import into
<application>Eclipse</application>.
</para>
</step>
</stepalternatives>
Modified:
root/docs/trunk/Developer_Guide/en-US/chap-Developer_Guide-RichFaces_overview.xml
===================================================================
---
root/docs/trunk/Developer_Guide/en-US/chap-Developer_Guide-RichFaces_overview.xml 2010-02-14
18:06:20 UTC (rev 16449)
+++
root/docs/trunk/Developer_Guide/en-US/chap-Developer_Guide-RichFaces_overview.xml 2010-02-15
04:02:44 UTC (rev 16450)
@@ -130,8 +130,11 @@
<section id="sect-Developer_Guide-RichFaces_overview-Technologies">
<title>Technologies</title>
<para>
- Incomplete
+ RichFaces originated from the <emphasis>Ajax4jsf</emphasis> project, an
open-source web application framework that added Ajax capabilities to the JavaServer Faces
(<acronym>JSF</acronym>) framework. The RichFaces components were split into a
separate commercial component library, then later both the Ajax4jsf and RichFaces
libraries were re-combined under the RichFaces name.
</para>
+ <para>
+ RichFaces 4.0 features full JSF2 integration and uses standard web application
technologies such as JavaScript, <acronym>XML</acronym> (Extensible Markup
Language), and <acronym>XHTML</acronym> (Extensible Hypertext Markup
Language).
+ </para>
</section>
<section
id="sect-Developer_Guide-RichFaces_overview-Differences_between_JSF_and_RichFaces_mechanisms">
Modified: root/docs/trunk/Developer_Guide/pom.xml
===================================================================
--- root/docs/trunk/Developer_Guide/pom.xml 2010-02-14 18:06:20 UTC (rev 16449)
+++ root/docs/trunk/Developer_Guide/pom.xml 2010-02-15 04:02:44 UTC (rev 16450)
@@ -59,7 +59,7 @@
<plugin>
<groupId>org.jboss.maven.plugins</groupId>
<artifactId>maven-jdocbook-plugin</artifactId>
- <version>2.2.0</version>
+ <version>2.2.1</version>
<extensions>true</extensions>
<configuration>
<formats>
@@ -96,7 +96,7 @@
<plugin>
<groupId>org.jboss.maven.plugins</groupId>
<artifactId>maven-jdocbook-plugin</artifactId>
- <version>2.2.0</version>
+ <version>2.2.1</version>
<extensions>true</extensions>
<configuration>
<formats>
@@ -123,7 +123,7 @@
<plugin>
<groupId>org.jboss.maven.plugins</groupId>
<artifactId>maven-jdocbook-plugin</artifactId>
- <version>2.2.0</version>
+ <version>2.2.1</version>
<extensions>true</extensions>
<configuration>
<formats>
@@ -150,7 +150,7 @@
<plugin>
<groupId>org.jboss.maven.plugins</groupId>
<artifactId>maven-jdocbook-plugin</artifactId>
- <version>2.2.0</version>
+ <version>2.2.1</version>
<extensions>true</extensions>
<configuration>
<formats>
@@ -178,7 +178,7 @@
<plugin>
<groupId>org.jboss.maven.plugins</groupId>
<artifactId>maven-jdocbook-plugin</artifactId>
- <version>2.2.0</version>
+ <version>2.2.1</version>
<extensions>true</extensions>
<configuration>
<formats>
@@ -217,7 +217,7 @@
<plugin>
<groupId>org.jboss.maven.plugins</groupId>
<artifactId>maven-jdocbook-plugin</artifactId>
- <version>2.2.0</version>
+ <version>2.2.1</version>
<extensions>true</extensions>
<dependencies>
<dependency>