I'm using JSF 2.0. Is there anyway to call a javascript function after a bean method? Something like
<h:commandLink oncomplete="pop()" action="#{bean.method}"/>
I tried oncomplete, but doesn't work.
I'm using JSF 2.0. Is there anyway to call a javascript function after a bean method? Something like
<h:commandLink oncomplete="pop()" action="#{bean.method}"/>
I tried oncomplete, but doesn't work.
I've found a way.
<h:commandLink action="#{bean.method}">
<f:ajax onevent="pop"/>
</h:commandLink>
<script type="text/javascript">
function pop(data){
if(data.status == "success"){
....
}
}
</script>
There are probably better ways, so if you have a better solution, feel free to leave your answer!