-
1. Wait Modal
lessonz May 2, 2011 1:02 PM (in response to lessonz)Surely someone has had to do similar.
-
2. Wait Modal
ovesper May 2, 2011 2:00 PM (in response to lessonz)No idea how to achieve that, but I would also be interested in a possible solution - whereas I would prefer the modal to disappear automatically once the server-process is finished.
-Oliver
-
3. Wait Modal
lessonz May 2, 2011 3:40 PM (in response to ovesper)Oliver, thanks for the interest. I would imagine the solution to both of our inquiries would be similar if not the same. Hopefully someone out there can help.
-
4. Wait Modal
lessonz May 5, 2011 7:44 PM (in response to lessonz)So, I know this must have something to do with an ajax push, but I'm just not seeing any good documentation on how to do this with RichFaces.
-
5. Wait Modal
daniell May 6, 2011 3:11 AM (in response to lessonz)I would try to do the following: In some bean, create an accessible attribute which indicates that the process has been finished.
<rich:modalPanel id="modal" ....>
<h:form id="pollForm">
<a4j:poll interval="xxx" enabled="#{not bean.finished}" reRender="modal" />
</h:form>
<h:panelGroup rendered="#{not bean.finished} >
"please wait" notification
</h:panelGroup>
<h:panelGroup rendered="#{bean.finished} >
content for finished (like button for closing the modalPanel...)
</h:panelGroup>
<rich:modalPanel ....>
-
6. Wait Modal
snaker May 6, 2011 4:37 AM (in response to daniell)You can try this:
you must create a status --->
<a4j:status name="LoadingStatus" onstart="#{rich:component('Loading')}.show();" onstop="#{rich:component('Loading')}.hide();" /><rich:popupPanel ......>
<h:outputLabel value="wait please...">
</rich:popupPanel>
The h:commandButton that you use must replace to a4j:commandButton
and in the a4j:commandButton add the attribute status:
<a4j:commandButton actionListener or action="#{nameBean.method}" status="LoadingStatus"/>
when you pulse the button the popup will open, when the process with the server finish, the popup will close
-
7. Wait Modal
lessonz May 13, 2011 3:50 PM (in response to lessonz)In the end I opted to use onclick="#{rich:component('testPopup')}.show();" and some hide() with two different modals to switch them out when appropriate. It's not ideal, but it seems to work okay.
Thanks.
-
8. Wait Modal
ilya_shaikovsky May 15, 2011 11:53 AM (in response to lessonz)in order to minimize count of code to be added - you could use onsubmit on form. (But in that case panels from a4j:status and onsubmit should be checked to be called once)
-
9. Wait Modal
ilya_shaikovsky May 15, 2011 11:55 AM (in response to ilya_shaikovsky)But that's true, the designed case - calling from a4j:status. But that works for ajax controls only.