We are moving an application to a newer version of RichFaces and JSF (4.2.2 and 2.0 respectively I believe) and I'm trying to make the necessary adjustments to get the app to function like it did before (I don't have a ton of experience with jsf/richfaces).
On one of our pages, when we click a button we need to display a pop-up that says "one moment please..." and when processing is done the pop up needs to go away. I started out trying something like this:
<a4j:commandButton id="viewEditTop" value="#{SearchBean.mode}"
action="#{SearchResultsBean.processSelected}"
styleClass="generalButton" onclick="#{rich:component('wait-dialog')}.show()" oncomplete="#{rich:component('wait-dialog')}.hide()"/>
But the oncomplete doesn't seem to fire. The pop-up gets displayed, but never goes away. After a ton of research and trying various things (mostly trying to call an a4j:status and trying to find details info about how to trigger oncomplete, and statuses and whatnot) I'm at a loss of what to do next.
Does anyone know how to get the oncomplete to fire? or if i'm supposed to be using an a4j:status, how I would get the status to work? I defined the status, added "onstart" and "onstop" to show/hide the pop-up and set my a4j:commandButton status to reference the status i created and it didn't work.
Thanks!
console.log('your custom message')in the "oncomplete" method to check if the action has been invoked. After that, make sure theSearchResultsBean.processSelectedmethod doesn't return a String and don't generate any exceptions. - Luiggi Mendoza<a4j:status onstart="#{rich:component('wait-dialog')}.show()" onstop="#{rich:component('wait-dialog')}.hide()" />, and erase those calls from your<a4j:commandButton>- Luiggi Mendoza