This content has been marked as final.
Show 5 replies
-
1. Re: How to call js on complete every ajax request ?
elf May 27, 2010 7:49 AM (in response to marioosh.net)try to use status component
-
2. Re: How to call js on complete every ajax request ?
marioosh.net May 27, 2010 7:51 AM (in response to marioosh.net)I discovered that i CAN put js inside a4j:outputPanel... but facesContext.maximumSeverity doesn't work
<a4j:outputPanel ajaxRendered="true"> <z:time/> <f:verbatim> <script type="text/javascript"> if (#{facesContext.maximumSeverity!=null}) {$info2('#messages');} </script> </f:verbatim> </a4j:outputPanel>
-
3. Re: How to call js on complete every ajax request ?
elf May 27, 2010 8:10 AM (in response to marioosh.net)try to use
if (#{
javascript:facesContext. ...
-
4. Re: How to call js on complete every ajax request ?
marioosh.net May 27, 2010 8:14 AM (in response to elf)Thanks for answer, but something is wrong, because i see that facesContext.maximumSeverity is not null, but in onstop it doesn't work for me...
<a4j:outputPanel ajaxRendered="true">#{facesContext.maximumSeverity}</a4j:outputPanel> <a4j:status onstart="" onstop="alert('that's ok'); if (#{facesContext.maximumSeverity!=null}) {alert('never showed')}"/>
if (#{javascript:facesContext.maximumSeverity!=null}) generate ParseException... :/
-
5. Re: How to call js on complete every ajax request ?
marioosh.net May 27, 2010 8:33 AM (in response to marioosh.net)Something like that works for me!
<a4j:outputPanel ajaxRendered="true" style="display: none;"><div id="severity">#{facesContext.maximumSeverity}</div></a4j:outputPanel> <a4j:status onstop="if(jQuery('#severity').text() != ''){alert('WORKS NOW');}"/>
Conclusion: in onstop attribute of a4j:status #{facesContext.maximumSeverity} can't be checked directly ??? Strange, maybe a bug...