-
1. Re: How show message while loading page?
mcmurdosound Oct 30, 2012 2:14 PM (in response to ezikoh)Do you do redirects to other pages or make partial view updates?
If you'd like to redirect you could try and add some javascript at one of the first entries in the <head> section to show a loading message. This can be removed at a late jQuery(document).ready handler.
If you just update some partof of the page, use <a4j:status> and lookaup the start and end events in the manual. These can be used to show / hide a loading message. In the old showcase should be some useful examples.
-
2. Re: How show message while loading page?
sivaprasad9394 Oct 31, 2012 1:12 AM (in response to ezikoh)Hi ezequiel,
Try adding this inside h:form,
1) Here use <a4:region tag and specifiy the id for the tag.
2) Inside the region do all the code.
3) After the form close tag use tag <a4j:status and specifiy the for attribute to region id mapping.
4) Model panel is created in seperate page.
5)Include the page in the SomePage.jsp or SomePage.xhtml.
SomePage.xhtml:
<h:form id="trainingForm">
<a4j:region id="trainingRegion">
------- you code -------
</a4j:region>
</h:form>
<a4j:status id="statusID" for="trainingRegion" forceId="true"
onstart="#{rich:component('wait')}.show()"
onstop="#{rich:component('wait')}.hide()"/>
<a4j:include id="loadWindowaddEditTraining"
viewId="/loading_page.xhtml"></a4j:include>
loading_page.xhtml:
<rich:modalPanel id="wait" autosized="true" width="50" height="50"
moveable="false" resizeable="false">
<h:graphicImage alt="Please Wait..." value="/img/loading_animation.gif"></h:graphicImage>
</rich:modalPanel>
I think it will help to display please wait model panel.
Thanks,
Siva
-
3. Re: How show message while loading page?
ezikoh Nov 29, 2012 7:19 AM (in response to sivaprasad9394)Thank you for your help, sorry for not before respond.