-
1. Re: migrate actionListener of actionParam to 4.1?
pvito Dec 27, 2011 3:56 AM (in response to mhn)Hi, Michael
Try this solution:
<h:form>
<t:inputHidden id="hello" forceId="true" value="#{requestScope['hello']}"/>
<a4j:commandButton render="#{MyController.rerenderIds}"
actionListener="#{MyController.doIt}"
oncomplete="#{MyController.oncompleteIds}">
<a4j:param name="foo"
assignTo="#{requestScope['foo']}"
value="#{MyController.someValue}"/>
</a4j:commandButton>
</h:form>
-
2. Re: migrate actionListener of actionParam to 4.1?
mhn Dec 27, 2011 8:19 AM (in response to pvito)Hi Vitaliy,
this does not work in my case because a4j:param ist executed after the actionListener of the commandButton.
I found a workaround with a simple f:param tag:
<f:param id="foo" name="foo" value="#{MyController.someValue}"/>
foo is set as a request parameter(!) before the actionListener is exeucted and therefore available in the actionListener.
But with f:param I cannot bind values of my backing beans directly. The values are accessible only as request parameters.
Any other idea with Richfaces tags?
<f:param id="aChangeProfileTextFieldPa" name="proDocumentId2" value="#{ProxyModeController.activeWorkbenchController.previewDocument.escapedDocumentId}"/> -
3. Re: migrate actionListener of actionParam to 4.1?
feuyeux Dec 27, 2011 10:27 AM (in response to pvito)<a4j:actionparam name="foo" assignTo="#{requestScope['foo']}" value="#{MyController.someValue}" actionListener="#{MyController.doIt}"/>
->
<a4j:param name="foo" assignTo="#{requestScope['foo']}" value="#{MyController.someValue}" listener="#{MyController.doIt}"/>
Or, you can use jsFunction. More reading: http://community.jboss.org/wiki/UseA4jjsFunctionToProxyTheJavascript