This content has been marked as final.
Show 3 replies
-
1. Conditional call to jsFunction from oncomplete.
iabughosh May 5, 2011 10:21 AM (in response to apashkev)add rendered condition to your a4j:support :
<a4j:support ... rendered="#{some condition}"/>
regards.
-
2. Conditional call to jsFunction from oncomplete.
apashkev May 5, 2011 10:42 AM (in response to iabughosh)Hello Ibrahim!
The problem is that I am calling an action from the mentioned <a4j:support and basing on the result of that action jsfunction should be called or not.
Thanks anyway.
-
3. Conditional call to jsFunction from oncomplete.
snaker May 5, 2011 11:08 AM (in response to apashkev)try this:
<a4j:support event="onclick" action="#{myBean.action}" oncomplete="if ('#{myBean.getErrorCode}' != '') reloadContent();"/>
or
<a4j:support event="onclick" action="#{myBean.action}" oncomplete="#{myBean.getErrorCode != null ? 'reloadContent();':'return false'}"/>