Author: SeanRogers
Date: 2009-12-22 22:22:00 -0500 (Tue, 22 Dec 2009)
New Revision: 16196
Added:
root/docs/trunk/Component_Reference/en-US/extras/exam-Component_Reference-a4jstatus-Updating_a_common_a4jstatus_component.xml_sample
root/docs/trunk/Component_Reference/en-US/extras/exam-Component_Reference-richgraphValidator-Using_the_value_attribute.xml_sample
Modified:
root/docs/trunk/Component_Reference/en-US/Book_Info.xml
root/docs/trunk/Component_Reference/en-US/Component_Reference.xml
root/docs/trunk/Component_Reference/en-US/Preface.xml
root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Processing_management.xml
Log:
Finished Processing Management
Modified: root/docs/trunk/Component_Reference/en-US/Book_Info.xml
===================================================================
--- root/docs/trunk/Component_Reference/en-US/Book_Info.xml 2009-12-23 02:03:22 UTC (rev
16195)
+++ root/docs/trunk/Component_Reference/en-US/Book_Info.xml 2009-12-23 03:22:00 UTC (rev
16196)
@@ -29,7 +29,7 @@
<year>&YEAR;</year>
<holder>&HOLDER;</holder>
</copyright>
- <!-- FOR PUBLICAN --><xi:include
href="Common_Content/Legal_Notice.xml"
xmlns:xi="http://www.w3.org/2001/XInclude"><!-- FOR
JDOCBOOK: --><xi:fallback
xmlns:xi="http://www.w3.org/2001/XInclude"><xi:include
href="fallback_content/Legal_Notice.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <!-- FOR PUBLICAN --><xi:include
href="Common_Content/Legal_Notice.xml"
xmlns:xi="http://www.w3.org/2001/XInclude"><!-- FOR
JDOCBOOK: --><xi:fallback
xmlns:xi="http://www.w3.org/2001/XInclude"><xi:include
href="fallback_content/Legal_Notice.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
</xi:fallback>
</xi:include>
<xi:include href="Author_Group.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
Modified: root/docs/trunk/Component_Reference/en-US/Component_Reference.xml
===================================================================
--- root/docs/trunk/Component_Reference/en-US/Component_Reference.xml 2009-12-23 02:03:22
UTC (rev 16195)
+++ root/docs/trunk/Component_Reference/en-US/Component_Reference.xml 2009-12-23 03:22:00
UTC (rev 16196)
@@ -3,9 +3,9 @@
]>
<book status="draft">
<xi:include href="Book_Info.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
- <!--
+ <!--
<xi:include href="Preface.xml"
xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include>
- --><xi:include
href="chap-Component_Reference-Introduction.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
+ --><xi:include
href="chap-Component_Reference-Introduction.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="chap-Component_Reference-Common_Ajax_attributes.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="chap-Component_Reference-Common_features.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
<part id="part-Component_Reference-a4j_tag_library">
Modified: root/docs/trunk/Component_Reference/en-US/Preface.xml
===================================================================
--- root/docs/trunk/Component_Reference/en-US/Preface.xml 2009-12-23 02:03:22 UTC (rev
16195)
+++ root/docs/trunk/Component_Reference/en-US/Preface.xml 2009-12-23 03:22:00 UTC (rev
16196)
@@ -3,10 +3,10 @@
]>
<preface id="pref-Component_Reference-Preface">
<title>Preface</title>
- <!-- FOR JDOCBOOK --><xi:include
href="Common_Content/Conventions.xml"
xmlns:xi="http://www.w3.org/2001/XInclude"><!-- FOR
PUBLICAN --><xi:fallback
xmlns:xi="http://www.w3.org/2001/XInclude"><xi:include
href="fallback_content/Conventions.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <!-- FOR JDOCBOOK --><xi:include
href="Common_Content/Conventions.xml"
xmlns:xi="http://www.w3.org/2001/XInclude"><!-- FOR
PUBLICAN --><xi:fallback
xmlns:xi="http://www.w3.org/2001/XInclude"><xi:include
href="fallback_content/Conventions.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
</xi:fallback>
</xi:include>
- <!-- PUBLICAN'S ORIGINAL XINCLUDES
--><xi:include href="Feedback.xml"
xmlns:xi="http://www.w3.org/2001/XInclude"><xi:fallback
xmlns:xi="http://www.w3.org/2001/XInclude"><xi:include
href="Common_Content/Feedback.xml"
xmlns:xi="http://www.w3.org/2001/XInclude"><!-- FOR
JDOCBOOK --><xi:fallback
xmlns:xi="http://www.w3.org/2001/XInclude"><xi:include
href="fallback_content/Feedback.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <!-- PUBLICAN'S ORIGINAL XINCLUDES
--><xi:include href="Feedback.xml"
xmlns:xi="http://www.w3.org/2001/XInclude"><xi:fallback
xmlns:xi="http://www.w3.org/2001/XInclude"><xi:include
href="Common_Content/Feedback.xml"
xmlns:xi="http://www.w3.org/2001/XInclude"><!-- FOR
JDOCBOOK --><xi:fallback
xmlns:xi="http://www.w3.org/2001/XInclude"><xi:include
href="fallback_content/Feedback.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
</xi:fallback>
</xi:include>
</xi:fallback>
Modified:
root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Processing_management.xml
===================================================================
---
root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Processing_management.xml 2009-12-23
02:03:22 UTC (rev 16195)
+++
root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Processing_management.xml 2009-12-23
03:22:00 UTC (rev 16196)
@@ -4,27 +4,231 @@
<chapter id="chap-Component_Reference-Processing_management">
<title>Processing management</title>
<para>
- Incomplete
+ This chapter covers those components that manage the processing of information,
requests, and updates.
</para>
<section id="sect-Component_Reference-Processing_management-a4jqueue">
<title><a4j:queue></title>
+ <itemizedlist>
+ <listitem>
+ <para>
+ component-family: <classname>org.ajax4jsf.Queue</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ component-class:
<classname>org.ajax4jsf.component.html.HtmlQueue</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ renderer-type: <classname>org.ajax4jsf.QueueRenderer</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ tag-class: <classname>org.ajax4jsf.taglib.html.jsp.QueueTag</classname>
+ </para>
+ </listitem>
+ </itemizedlist>
<para>
- Incomplete
+ The <sgmltag><a4j:queue></sgmltag> component manages a queue
of Ajax requests to control message processing.
</para>
+ <para>
+ The queue can be disabled by setting the <varname>disabled</varname>
attribute to <literal>true</literal>. The <varname>size</varname>
attribute specifies the number of requests that can be stored in the queue at a time;
smaller queue sizes help prevent server overloads. When the queue's size is exceeded,
the <varname>sizeExceededBehavior</varname> determines the way in which the
queue handles the requests:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <literal>dropNext</literal> drops the next request currently in the
queue.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>dropNew</literal> drops the incoming request.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>fireNext</literal> immediately sends the next request currently
in the queue.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>fireNew</literal> immediately sends the incoming request.
+ </para>
+ </listitem>
+ </itemizedlist>
+ <para>
+ The <sgmltag><a4j:queue></sgmltag> features several events
relating to queuing actions:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ The <varname>oncomplete</varname> event attribute is fired after a
request is completed. The request object is passed as a parameter to the event handler, so
the queue is accessible using <code>request.queue</code> and the element which
was the source of the request is accessible using <code>this</code>.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ The <varname>onrequestqueue</varname> event attribute is fired after a
new request has been added to the queue.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ The <varname>onrequestdequeue</varname> event attribute is fired after a
request has been removed from the queue.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ The <varname>onsizeexceeded</varname> event attribute is fired when the
queue has been exceeded.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ The <varname>onsubmit</varname> event attribute is fired before the
request is sent.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ The <varname>onsuccess</varname> event attribute is fired after a
successful request bu before the <acronym>DOM</acronym> is updated on the
client side.
+ </para>
+ </listitem>
+ </itemizedlist>
</section>
<section id="sect-Component_Reference-Processing_management-a4jlog">
<title><a4j:log></title>
+ <itemizedlist>
+ <listitem>
+ <para>
+ component-type: <classname>org.ajax4jsf.Log</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ component-family: <classname>org.ajax4jsf.Log</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ component-class:
<classname>org.ajax4jsf.component.html.AjaxLog</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ renderer-type: <classname>org.ajax4jsf.LogRenderer</classname>
+ </para>
+ </listitem>
+ </itemizedlist>
<para>
- Incomplete
+ The <sgmltag><a4j:log></sgmltag> component generates
JavaScript that opens a debug window, logging application information such as requests,
responses, and <acronym>DOM</acronym> changes.
</para>
+ <para>
+ The <varname>popup</varname> attribute causes the logging data to appear
in a new pop-up window if set to <literal>true</literal>, or in place on the
current page if set to <literal>false</literal>. The window is set to be
opened by pressing the key combination <keycombo
action="simul"><keycap>Ctrl</keycap><keycap>Shift</keycap><keycap>L</keycap></keycombo>;
this can be partially reconfigured with the <varname>hotkey</varname>
attribute, which specifies the letter key to use in combination with
<keycombo><keycap>Ctrl</keycap><keycap>Shift</keycap></keycombo>
instead of <keycap>L</keycap>.
+ </para>
+ <para>
+ The amount of data logged can be determined with the
<varname>level</varname> attribute:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <literal>ERROR</literal>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>FATAL</literal>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>INFO</literal>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>WARN</literal>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>ALL</literal>, the default setting, logs all data.
+ </para>
+ </listitem>
+ </itemizedlist>
+ <example id="exam-Component_Reference-a4jlog-a4jlog_example">
+ <title><sgmltag><a4j:log></sgmltag>
example</title>
+
+<programlisting language="XML" role="XML">
+<a4j:log level="ALL" popup="false" width="400"
height="200" />
+</programlisting>
+ </example>
+ <note>
+ <title>Log renewal</title>
+ <para>
+ The log is automatically renewed after each Ajax request. It does not need to be
explicitly re-rendered.
+ </para>
+ </note>
</section>
<section id="sect-Component_Reference-Processing_management-a4jstatus">
<title><a4j:status></title>
+ <itemizedlist>
+ <listitem>
+ <para>
+ component-type: <classname>org.ajax4jsf.Status</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ component-family: <classname>javax.faces.Panel</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ component-class:
<classname>org.ajax4jsf.component.html.HtmlAjaxStatus</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ renderer-type:
<classname>org.ajax4jsf.components.AjaxStatusRenderer</classname>
+ </para>
+ </listitem>
+ </itemizedlist>
<para>
- Incomplete
+ The <sgmltag><a4j:status></sgmltag> component displays the
status of current Ajax requests; the status can be either in progress or complete.
</para>
+ <para>
+ The <varname>startText</varname> attribute defines the text shown after
the request has been started and is currently in progress. This text can be styled with
the <varname>startStyle</varname> and
<varname>startStyleClass</varname> attributes. Similarly, the
<varname>stopText</varname> attribute defines the text shown once the request
is complete, and text is styled with the <varname>stopStyle</varname> and
<varname>stopStyleClass</varname> attributes. Alternatively, the text styles
can be customized using facets, with the facet name set to either
<literal>start</literal> or <literal>stop</literal> as required.
If the <varname>stopText</varname> attribute is not defined, and no facet
exists for the stopped state, the status is simply not shown; in this way only the
progress of the request is displayed to the user.
+ </para>
+ <example
id="exam-Component_Reference-a4jstatus-Basic_a4jstatus_usage">
+ <title>Basic <sgmltag><a4j:status></sgmltag>
usage</title>
+
+<programlisting language="XML" role="XML">
+<a4j:status startText="In progress..." stopText="Complete"
/>
+</programlisting>
+ </example>
+ <para>
+ The <sgmltag><a4j:status></sgmltag> component works for each
Ajax component inside the local region. If no region is defined, every request made on the
page will activate the <sgmltag><a4j:status></sgmltag>
component. Alternatively, the <sgmltag><a4j:status></sgmltag>
component can be linked to specific components in one of two ways:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ The <varname>for</varname> attribute can be used to specify the
component for which the status is to be monitored.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ With an <varname>id</varname> identifier attribute specified for the
<sgmltag><a4j:status></sgmltag>, individual components can have
their statuses monitored by referencing the identifier with their own
<varname>status</varname> attributes.
+ </para>
+ </listitem>
+ </itemizedlist>
+ <example
id="exam-Component_Reference-a4jstatus-Updating_a_common_a4jstatus_component">
+ <title>Updating a common
<sgmltag><a4j:status></sgmltag> component</title>
+
+<programlisting language="XML" role="XML">
+<xi:include parse="text"
href="extras/exam-Component_Reference-a4jstatus-Updating_a_common_a4jstatus_component.xml_sample"
xmlns:xi="http://www.w3.org/2001/XInclude" />
+</programlisting>
+ </example>
</section>
</chapter>
Added:
root/docs/trunk/Component_Reference/en-US/extras/exam-Component_Reference-a4jstatus-Updating_a_common_a4jstatus_component.xml_sample
===================================================================
---
root/docs/trunk/Component_Reference/en-US/extras/exam-Component_Reference-a4jstatus-Updating_a_common_a4jstatus_component.xml_sample
(rev 0)
+++
root/docs/trunk/Component_Reference/en-US/extras/exam-Component_Reference-a4jstatus-Updating_a_common_a4jstatus_component.xml_sample 2009-12-23
03:22:00 UTC (rev 16196)
@@ -0,0 +1,38 @@
+<a4j:region id="extr">
+ <h:form>
+ <h:outputText value="Status:" />
+ <a4j:status id="commonstatus" startText="In Progress...."
stopText="" />
+
+ <a4j:region id="intr">
+ <h:panelGrid columns="2">
+ <h:outputText value="Name" />
+ <h:inputText id="name"
value="#{userBean.name}">
+ <a4j:support event="onkeyup" reRender="out"
status="commonstatus" />
+ </h:inputText>
+
+ <h:outputText value="Job" />
+ <h:inputText id="job" value="#{userBean.job}">
+ <a4j:support event="onkeyup" reRender="out"
status="commonstatus" />
+ </h:inputText>
+
+ <h:panelGroup />
+
+ </h:panelGrid>
+ </a4j:region>
+ <a4j:region>
+ <br />
+ <rich:spacer height="5" />
+ <b><h:outputText id="out"
+ value="Name: #{userBean.name}, Job: #{userBean.job}"
/></b>
+ <br />
+ <rich:spacer height="5" />
+ <br />
+ <a4j:commandButton ajaxSingle="true" value="Clean Up
Form"
+ reRender="name, job, out" status="commonstatus">
+ <a4j:actionparam name="n" value=""
assignTo="#{userBean.name}" />
+ <a4j:actionparam name="j" value=""
assignTo="#{userBean.job}" />
+ </a4j:commandButton>
+ </a4j:region>
+
+ </h:form>
+</a4j:region>
Added:
root/docs/trunk/Component_Reference/en-US/extras/exam-Component_Reference-richgraphValidator-Using_the_value_attribute.xml_sample
===================================================================
---
root/docs/trunk/Component_Reference/en-US/extras/exam-Component_Reference-richgraphValidator-Using_the_value_attribute.xml_sample
(rev 0)
+++
root/docs/trunk/Component_Reference/en-US/extras/exam-Component_Reference-richgraphValidator-Using_the_value_attribute.xml_sample 2009-12-23
03:22:00 UTC (rev 16196)
@@ -0,0 +1,30 @@
+<h:form id="graphValidatorForm2">
+ <a4j:region renderRegionOnly="true">
+ <rich:graphValidator summary="Invalid values: "
value="#{dayStatistics}">
+ <table>
+ <thead>
+ <tr>
+ <th>Activity</th>
+ <th>Time</th>
+ </tr>
+ </thead>
+ <tbody>
+ <a4j:repeat value="#{dayStatistics.dayPasstimes}"
var="pt"
+ id="table">
+ <tr>
+ <td align="center"
width="100px"><h:outputText
+ value="#{pt.title}" /></td>
+ <td align="center"
width="100px"><rich:inputNumberSpinner
+ minValue="0" maxValue="24"
value="#{pt.time}" id="time">
+ </rich:inputNumberSpinner></td>
+ <td><rich:message for="time"
/></td>
+ </tr>
+ </a4j:repeat>
+ </tbody>
+ </table>
+ </rich:graphValidator>
+ <a4j:commandButton value="Store my details"
+ actionListener="#{dayStatistics.store}" reRender="panel"
/>
+ <rich:messages infoClass="green" errorClass="red" />
+ </a4j:region>
+</h:form>