-
1. RichFaces 4 - Call action from a4j:Ajax
ilya40umov Jan 17, 2011 12:12 PM (in response to jerarckill)1) You can look for components' attributes in taglib files. You can find rich.taglib.xml and a4j.taglib.xml here:
richfaces-components-ui-4.0.0.XXXXXXX.jar!/META-INF/rich.taglib.xml
richfaces-components-ui-4.0.0.XXXXXXX.jar!/META-INF/a4j.taglib.xml
2) You can look at showcase application where some of attributes are already used in examples.
-
2. Re: RichFaces 4 - Call action from a4j:Ajax
jerarckill Jan 18, 2011 3:50 AM (in response to ilya40umov)Hello and thanks Ilya!
Here below a list of the attributes of the f:ajax tag:
<attribute>
<name>bypassUpdates</name>
<type>boolean</type>
</attribute>
<attribute>
<name>data</name>
<type>java.lang.Object</type>
</attribute>
<attribute>
<name>disabled</name>
<type>boolean</type>
</attribute>
<attribute>
<name>execute</name>
<type>java.util.Collection</type>
</attribute>
<attribute>
<name>immediate</name>
<type>boolean</type>
</attribute>
<attribute>
<name>limitRender</name>
<type>boolean</type>
</attribute>
<attribute>
<name>listener</name>
<type>javax.el.MethodExpression</type>
</attribute>
<attribute>
<name>onbeforedomupdate</name>
<type>java.lang.String</type>
</attribute>
<attribute>
<name>onbegin</name>
<type>java.lang.String</type>
</attribute>
<attribute>
<name>oncomplete</name>
<type>java.lang.String</type>
</attribute>
<attribute>
<name>onerror</name>
<type>java.lang.String</type>
</attribute>
<attribute>
<name>queueId</name>
<type>java.lang.String</type>
</attribute>
<attribute>
<name>render</name>
<type>java.util.Collection</type>
</attribute>
<attribute>
<name>status</name>
<type>java.lang.String</type>
</attribute>
I suppose the "listener attribute is the one I am searching for.
Testing...
-
3. Re: RichFaces 4 - Call action from a4j:Ajax
jerarckill Jan 18, 2011 4:04 AM (in response to jerarckill)Ok, I tested and indeed, the listener attribute does just that!
Silly example I made:
<a4j:ajax event="click" execute="@this" render="workflowDefinitionSpecific, @this" listener="#{multiCriteriaSearchBean.callMe}"/>
callMe being just a simple void method in the bean Named multiCriteriaSearchBean.
Thank you for your help Ilya!
-
4. RichFaces 4 - Call action from a4j:Ajax
ilya_shaikovsky Jan 18, 2011 4:12 AM (in response to jerarckill)B.t.w. if your intention is to process some parent component events - action or value changing - define corresponding listeners at parent component instead. Them will be called for ajax requests and provide component original events with proper information. I prefert that as it more accurate.
-
5. Re: RichFaces 4 - Call action from a4j:Ajax
jattra Jan 28, 2011 2:37 PM (in response to ilya_shaikovsky)Hello,
I am using RF4 integrated with Spring Webflow. I would like to have a4j:ajax to invoke Webflow transition. In RF3 it was possible using <a4j:support action="myTransition" />
I see I can use the new listener attribute to change things but it is not an elegant way in my case when using webflow. Can anybody help me, please? Thank You in advance.
-
6. Re: RichFaces 4 - Call action from a4j:Ajax
nbelaevski Jan 30, 2011 4:50 PM (in response to jattra)Hi,
You can try sending ActionEvent from Ajax behavior listener or calling NavigationHandler directly.