[richfaces-svn-commits] JBoss Rich Faces SVN: r6317 - trunk/docs/faq/en/src/main/docbook/module.

richfaces-svn-commits at lists.jboss.org richfaces-svn-commits at lists.jboss.org
Mon Feb 25 06:40:44 EST 2008


Author: cluts
Date: 2008-02-25 06:40:44 -0500 (Mon, 25 Feb 2008)
New Revision: 6317

Modified:
   trunk/docs/faq/en/src/main/docbook/module/RFCfaq.xml
Log:
http://jira.jboss.com/jira/browse/RF-2099 - added the information in FAQ

Modified: trunk/docs/faq/en/src/main/docbook/module/RFCfaq.xml
===================================================================
--- trunk/docs/faq/en/src/main/docbook/module/RFCfaq.xml	2008-02-25 09:50:46 UTC (rev 6316)
+++ trunk/docs/faq/en/src/main/docbook/module/RFCfaq.xml	2008-02-25 11:40:44 UTC (rev 6317)
@@ -1777,5 +1777,30 @@
 </h:form>    
 ...]]></programlisting>                
         </section>       
-        
+ <section id="AddSupportAsFacet">
+         <title>How to add support as facet instead of children?</title>
+         <para>In order to add <emphasis role="bold">
+                 <property>&lt;a4j:support&gt;</property>
+         </emphasis> in Java code you should  add it as <emphasis><property>facet</property></emphasis>, not children:</para>
+         <para>
+                 <emphasis role="bold">Example:</emphasis>
+         </para>
+         <programlisting role="XML"><![CDATA[...
+<h:inputText value="#{bean.text}">
+    <a4j:support event="onkeyup" reRender="output" action="#{bean.action}"/>
+</h:inputText>
+...]]></programlisting>      
+         <para>Below you can see Java code:</para>
+         <para>
+                 <emphasis role="bold">Example:</emphasis>
+         </para>
+<programlisting role="JAVA"><![CDATA[HtmlInputText inputText = new HtmlInputText();
+...
+HtmlAjaxSupport ajaxSupport = new HtmlAjaxSupport();
+      ajaxSupport.setActionExpression(FacesContext.getCurrentInstance().getApplication().getExpressionFactory().createMethodExpression(FacesContext.getCurrentInstance().getELContext(), "#{bean.action}", String.class, new Class[] {}));
+      ajaxSupport.setEvent("onkeyup");
+      ajaxSupport.setReRender("output");
+      inputText.getFacets().put("a4jsupport", ajaxSupport);
+]]></programlisting>      
+ </section>
 </chapter>




More information about the richfaces-svn-commits mailing list