Author: cluts
Date: 2008-09-03 05:51:44 -0400 (Wed, 03 Sep 2008)
New Revision: 10290
Modified:
trunk/docs/userguide/en/src/main/docbook/modules/RFCarchitectover.xml
Log:
RF-4069 - updated information
RF-4306 - updated code example and added code for "web.xml"
Modified: trunk/docs/userguide/en/src/main/docbook/modules/RFCarchitectover.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/modules/RFCarchitectover.xml 2008-09-03
09:51:09 UTC (rev 10289)
+++ trunk/docs/userguide/en/src/main/docbook/modules/RFCarchitectover.xml 2008-09-03
09:51:44 UTC (rev 10290)
@@ -768,53 +768,53 @@
</emphasis>, <emphasis>
<property>"onmouseover"</property>
</emphasis>, etc. </para>
- <!--para>Most important attributes of components that provide Ajax request
calling features are:</para>
- <itemizedlist>
- <listitem>
- <emphasis>
- <property>"reRender"</property>
- </emphasis>attribute as it was mentioned <link
linkend="SendAnAJAXRequest">before</link>
- specifies components to be reRendered after Ajax response. The attribute can be
specified
- using EL expression and formed dynamicaly on the server side (see <ulink
- url="index.html#FAQ">FAQ chapter</ulink>). </listitem>
- <listitem>
- <emphasis>
- <property>"RequestDelay"</property>
- </emphasis> attribute is used for a requests frequency regulation.
</listitem>
- </itemizedlist>
- <programlisting role="XML"><![CDATA[<h:inputText
size="50" value="#{bean.text}">
- <a4j:support event="onkeyup" RequestDelay="3"/>
- </h:inputText>]]></programlisting>
- <para>So every next request from the frequent keyboard events will be delayed
on 3 ms to
- reduce the number of requests. </para>
- <itemizedlist>
- <listitem>
- <emphasis>
- <property>"EventsQueue"</property>
- </emphasis> is a queue that stores the next request. </listitem>
- <listitem>
- <emphasis>
- <property>"LimitToList"</property>
- </emphasis> attribute is used to regulate updatable regions. Setting it to true
limits the
- updatable areas only to ones specified in a reRender list, in other case all Output
Panels
- of the region are updated. </listitem>
- <listitem>
- <emphasis>
- <property>"ajaxSingle"</property>
- </emphasis> attributes specify regions to be sent with a request, if
- "false" it is a full region, in other case it's is only a
- control caused event. </listitem>
-
- <listitem>
- <emphasis>
- <property>"timeout"</property>
- </emphasis>attribute is used for response waiting time on a particular request.
If a
- response is not received during this time, the request is aborted. </listitem>
-
- <listitem>
- <emphasis>
- <property>"ignoreDupResponses"</property>
- </emphasis> is used to abort unfinished request on new event.
</listitem>
+ <!--para>Most important attributes of components that provide Ajax request
calling features are:</para>
+ <itemizedlist>
+ <listitem>
+ <emphasis>
+ <property>"reRender"</property>
+ </emphasis>attribute as it was mentioned <link
linkend="SendAnAJAXRequest">before</link>
+ specifies components to be reRendered after Ajax response. The attribute can be
specified
+ using EL expression and formed dynamicaly on the server side (see <ulink
+ url="index.html#FAQ">FAQ chapter</ulink>). </listitem>
+ <listitem>
+ <emphasis>
+ <property>"RequestDelay"</property>
+ </emphasis> attribute is used for a requests frequency regulation.
</listitem>
+ </itemizedlist>
+ <programlisting role="XML"><![CDATA[<h:inputText
size="50" value="#{bean.text}">
+ <a4j:support event="onkeyup" RequestDelay="3"/>
+ </h:inputText>]]></programlisting>
+ <para>So every next request from the frequent keyboard events will be delayed
on 3 ms to
+ reduce the number of requests. </para>
+ <itemizedlist>
+ <listitem>
+ <emphasis>
+ <property>"EventsQueue"</property>
+ </emphasis> is a queue that stores the next request. </listitem>
+ <listitem>
+ <emphasis>
+ <property>"LimitToList"</property>
+ </emphasis> attribute is used to regulate updatable regions. Setting it to true
limits the
+ updatable areas only to ones specified in a reRender list, in other case all Output
Panels
+ of the region are updated. </listitem>
+ <listitem>
+ <emphasis>
+ <property>"ajaxSingle"</property>
+ </emphasis> attributes specify regions to be sent with a request, if
+ "false" it is a full region, in other case it's is only a
+ control caused event. </listitem>
+
+ <listitem>
+ <emphasis>
+ <property>"timeout"</property>
+ </emphasis>attribute is used for response waiting time on a particular request.
If a
+ response is not received during this time, the request is aborted. </listitem>
+
+ <listitem>
+ <emphasis>
+ <property>"ignoreDupResponses"</property>
+ </emphasis> is used to abort unfinished request on new event.
</listitem>
</itemizedlist-->
@@ -920,74 +920,74 @@
decoding, conversion/validation, value applying phases are executed. The input field
with the <code>id="email"</code> is handled the same
way on blur
event. </para>
- <!--para>
- The
- <emphasis>
- <property>"process"</property>
- </emphasis>
- attribute has two limitations:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- it works only if
- <emphasis>
- <property>"ajaxSingle"</property>
- </emphasis>
- equals to "true" for given command component
- </para>
- </listitem>
- <listitem>
- <para>
- you do not have to point this attribute to one
- of the own parent components to avoid processing
- of command component twice
- </para>
- </listitem>
- </itemizedlist>
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
- <programlisting role="XML"><![CDATA[...
-<h:form>
- <h:inputText id="oneA" value="#{bean.width}"/>
- <br/>
- <h:inputText id="oneB" value="#{bean.text}"/>
- <br/>
- <a4j:commandButton value="Submit2" process="oneB"
ajaxSingle="true" reRender=":three1, :three2"/>
-</h:form>
-<h:outputText id="three1" value="#{bean.width}"/>
- <br/>
-<h:outputText id="three2" value="#{bean.text}"/>
-...]]></programlisting>
- <para>
- In the example above after you click on the
- <emphasis role="bold">
- <property><a4j:commandButton></property>
- </emphasis>
- <property>only</property>
- <emphasis role="bold">
- <property><h:inputText></property>
- </emphasis>
- with
- <code>"oneB"</code>
- id is processed and entered data appears into the
- <emphasis role="bold">
- <property><h:outputText></property>
- </emphasis>
- with
- <code>"three2"</code>
- id. If you doesn't use this attribute
- <property>both</property>
- <emphasis role="bold">
- <property><h:inputText></property>
- </emphasis>
- is processed and entered data appears into the
- <property>both</property>
- <emphasis role="bold">
- <property><h:outputText></property>
- </emphasis>
- .
+ <!--para>
+ The
+ <emphasis>
+ <property>"process"</property>
+ </emphasis>
+ attribute has two limitations:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ it works only if
+ <emphasis>
+ <property>"ajaxSingle"</property>
+ </emphasis>
+ equals to "true" for given command component
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ you do not have to point this attribute to one
+ of the own parent components to avoid processing
+ of command component twice
+ </para>
+ </listitem>
+ </itemizedlist>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="XML"><![CDATA[...
+<h:form>
+ <h:inputText id="oneA" value="#{bean.width}"/>
+ <br/>
+ <h:inputText id="oneB" value="#{bean.text}"/>
+ <br/>
+ <a4j:commandButton value="Submit2" process="oneB"
ajaxSingle="true" reRender=":three1, :three2"/>
+</h:form>
+<h:outputText id="three1" value="#{bean.width}"/>
+ <br/>
+<h:outputText id="three2" value="#{bean.text}"/>
+...]]></programlisting>
+ <para>
+ In the example above after you click on the
+ <emphasis role="bold">
+ <property><a4j:commandButton></property>
+ </emphasis>
+ <property>only</property>
+ <emphasis role="bold">
+ <property><h:inputText></property>
+ </emphasis>
+ with
+ <code>"oneB"</code>
+ id is processed and entered data appears into the
+ <emphasis role="bold">
+ <property><h:outputText></property>
+ </emphasis>
+ with
+ <code>"three2"</code>
+ id. If you doesn't use this attribute
+ <property>both</property>
+ <emphasis role="bold">
+ <property><h:inputText></property>
+ </emphasis>
+ is processed and entered data appears into the
+ <property>both</property>
+ <emphasis role="bold">
+ <property><h:outputText></property>
+ </emphasis>
+ .
</para-->
</section>
</section>
@@ -1157,12 +1157,12 @@
<title>Note:</title>
<para> If you use <property>ALL</property> value of Scripts Load
Strategy, the
JavaScript files compression turns off! </para>
- <!--programlisting role="XML"><![CDATA[...
- <context-param>
- <param-name>org.ajax4jsf.COMPRESS_SCRIPT</param-name>
- <param-value>false</param-value>
- </context-param>
- ...
+ <!--programlisting role="XML"><![CDATA[...
+ <context-param>
+ <param-name>org.ajax4jsf.COMPRESS_SCRIPT</param-name>
+ <param-value>false</param-value>
+ </context-param>
+ ...
]]></programlisting-->
</note>
@@ -1196,15 +1196,23 @@
<para> RichFaces allows to redefine standard handlers responsible for processing
of
different exceptional situations. It helps to define own JavaScript, which is
executed
when these situations occur. </para>
+ <para>
+ Add the following code to web.xml:
+ </para>
+ <programlisting role="XML"><![CDATA[<context-param>
+ <param-name>org.ajax4jsf.handleViewExpiredOnClient</param-name>
+ <param-value>true</param-value>
+</context-param>]]>
+ </programlisting>
<section id="RequestErrorsHandling">
<?dbhtml filename="RequestErrorsHandling.html"?>
<title>Request Errors Handling</title>
<para> To execute your own code on the client in case of an error during Ajax
request,
it's necessary to redefine the standard
<code>"A4J.AJAX.onError"</code> method: </para>
- <programlisting role="JAVA"><![CDATA[A4J.AJAX.onError =
function(req,status,message) {
- // Custom Developer Code
-};]]></programlisting>
+ <programlisting role="JAVA"><![CDATA[ A4J.AJAX.onError =
function(req,status,message){
+ window.alert("Custom onError handler "+message);
+}]]></programlisting>
<para> The function defined this way accepts as parameters: </para>
<itemizedlist>
<listitem>
@@ -1236,10 +1244,14 @@
<emphasis role="bold">Example:</emphasis>
</para>
- <programlisting role="JAVA"><![CDATA[A4J.AJAX.onExpired =
function(loc,expiredMsg){
- // Custom Developer Code
-};
-]]></programlisting>
+ <programlisting role="JAVA">
+<![CDATA[A4J.AJAX.onExpired = function(loc,expiredMsg){
+ if(window.confirm("Custom onExpired handler "+expiredMsg+" for a
location: "+loc)){
+ return loc;
+ } else {
+ return false;
+ }
+}]]></programlisting>
<para>Here the function receives in params:</para>
<itemizedlist>
@@ -1255,11 +1267,11 @@
</emphasis> event. </para>
</listitem>
</itemizedlist>
- <!--note>
- <title>Note:</title>
- Until the version 1.0.5 the method can't be redefined on <emphasis >
- <property>"Session Expiration"</property>,
- </emphasis> a confirmation dialog with a request for view reloading was always
called.
+ <!--note>
+ <title>Note:</title>
+ Until the version 1.0.5 the method can't be redefined on <emphasis >
+ <property>"Session Expiration"</property>,
+ </emphasis> a confirmation dialog with a request for view reloading was always
called.
</note-->
</section>
</section>
@@ -1370,8 +1382,8 @@
<para>
<emphasis role="bold">Example:</emphasis>
</para>
- <programlisting role="XML">
- <rich:panel> ... </rich:panel>
+ <programlisting role="XML">
+ <rich:panel> ... </rich:panel>
</programlisting>
<para> The code generates a panel component on a page, which consists of two
elements: a
@@ -1388,8 +1400,8 @@
<para>
<emphasis role="bold">Example:</emphasis>
</para>
- <programlisting role="XML">
- <div class="dr-pnl rich-panel"> ... </div>
+ <programlisting role="XML">
+ <div class="dr-pnl rich-panel"> ... </div>
</programlisting>
<para> dr-pnl is a CSS class specified in the framework via skin parameters:
</para>
@@ -1425,9 +1437,9 @@
<para>
<emphasis role="bold">Example:</emphasis>
</para>
- <programlisting role="XML">
- <rich:panel styleClass="customClass"> ...
- </rich:panel>
+ <programlisting role="XML">
+ <rich:panel styleClass="customClass"> ...
+ </rich:panel>
</programlisting>
<para> Could add some style properties from customClass to one particular panel,
as a
@@ -1437,9 +1449,9 @@
<para>
<emphasis role="bold">Example:</emphasis>
</para>
- <programlisting role="XML">
- <div class="dr_pnl rich-panel customClass"> ...
- </div>
+ <programlisting role="XML">
+ <div class="dr_pnl rich-panel customClass"> ...
+ </div>
</programlisting>
</section>
@@ -3039,8 +3051,10 @@
]]></programlisting>
<note>
- <para> Now necessary to use resources prefix
<code>a4j/version</code>
- instead of <code>a4j_version</code>. </para>
+ <para>
+ Now necessary to use resources prefix <code>a4j/versionXXX</code>
instead of <code>a4j_versionXXX</code>.
+ Base64 encoder changed to use '<code>!</code>' instead
of '<code>.</code>'.
+ </para>
</note>
@@ -3323,7 +3337,7 @@
<para>For example </para>
- <programlisting role="XML">
+ <programlisting role="XML">
<![CDATA[...
.rich-calendar-cell {
background: #537df8;
@@ -3342,7 +3356,7 @@
<code><f:verbatim> <![CDATA[ ...]]>
</f:verbatim></code> tags. </para>
- <programlisting role="XML">
+ <programlisting role="XML">
<![CDATA[...
<u:selector name=".rich-calendar-cell">
<u:style name="border-bottom-color" skin="panelBorderColor"/>