Author: vkorluzhenko
Date: 2007-11-15 11:37:46 -0500 (Thu, 15 Nov 2007)
New Revision: 4018
Modified:
trunk/docs/userguide/en/src/main/docbook/modules/RFCarchitectover.xml
Log:
http://jira.jboss.com/jira/browse/RF-1042 - Added section "Other usefil
atributes" with description of status and focus attributes.
Modified: trunk/docs/userguide/en/src/main/docbook/modules/RFCarchitectover.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/modules/RFCarchitectover.xml 2007-11-15
16:32:48 UTC (rev 4017)
+++ trunk/docs/userguide/en/src/main/docbook/modules/RFCarchitectover.xml 2007-11-15
16:37:46 UTC (rev 4018)
@@ -547,12 +547,76 @@
</section>
- <!--section id="Otherusefulattributes">
+ <section id="Otherusefulattributes">
<?dbhtml filename="Otherusefulattributes.html"?>
<title>Other useful attributes</title>
-
- </section-->
+ <para><emphasis>
+ <property>"status"</property>
+ </emphasis> attribute for Ajax components (such as <emphasis
role="bold">
+ <property><a4j:commandButton></property>
+ </emphasis>, <emphasis role="bold">
+ <property><a4j:poll></property>
+ </emphasis>, etc.) points to an ID of <emphasis
role="bold">
+ <property><a4j:status></property>
+ </emphasis> component. Use this attribute if you want to share <emphasis
role="bold">
+ <property><a4j:status></property>
+ </emphasis> component between different Ajax components from different
regions. The
+ following example shows it. </para>
+ <programlisting role="XML"><![CDATA[...
+ <a4j:region id="extr">
+ <h:form>
+ <h:outputText value="Status:" />
+ <a4j:status id="commonstatus" startText="In
Progress...." stopText=""/>
+ <h:panelGrid columns="2">
+ <h:outputText value="Name"/>
+ <h:inputText id="name"
value="#{userBean.name}">
+ <a4j:support event="onkeyup" reRender="out"
/>
+ </h:inputText>
+ <h:outputText value="Job"/>
+ <a4j:region id="intr">
+ <h:inputText id="job"
value="#{userBean.job}">
+ <a4j:support event="onkeyup"
reRender="out" status="commonstatus"/>
+ </h:inputText>
+ </a4j:region>
+ </h:panelGrid>
+
+ <a4j:region>
+ <h:outputText id="out" value="Name: #{userBean.name},
Job: #{userBean.job}" />
+ <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>
+...
+]]></programlisting>
+
+ <para>In the example <emphasis role="bold">
+ <property><a4j:support></property>
+ </emphasis> and <emphasis role="bold">
+ <property><a4j:commandButton></property>
+ </emphasis> are defined in different regions. Values of <emphasis>
+ <property>"status"</property>
+ </emphasis> attribute for these components points to an ID of <emphasis
role="bold">
+ <property><a4j:support></property>
+ </emphasis>.Thus, the <emphasis role="bold">
+ <property><a4j:support></property>
+ </emphasis> component is shared between two components from different
regions.</para>
+
+ <para>More information could be found <ulink
+
url="http://livedemo.exadel.com/richfaces-demo/richfaces/status.jsf?...
+ >here</ulink>.</para>
+
+ <para>Other useful attribute is <emphasis>
+ <property>"focus"</property>
+ </emphasis>. It points to an ID of a component where focus will be set
after an Ajax
+ request.</para>
+
+ </section>
+
</section>
<section id="HowTo...">