Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

Im developing a SW Application. I have been for several time trying to show a modal between the transition of my xhtml pages. I dont want the user can push many buttons or repeat pushing while the next screen is loading.

First i tried it putting an overlayPaneltrying to cover the full screen but i found this problem:

p:overlayPanel Full Screen

Then, I tried it using blockUI blocking the whole body of my page, but then I found this other problem:

p:blockui disable ajax

Finally, I really thought that i got it, using a JS function but then I had this problem (basically the problem is that it dont works with the dataTable):

onstart and oncomplete dont work in datatable with p:commandLink

Thank U In Advice!!!!

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
160 views
Welcome To Ask or Share your Answers For Others

1 Answer

to make an ajaxStatus try to make it like that (do not forget that the ajaxStatus is invoked each time you use a p:ajax that mean in your dataTable you need to add an ajax event when you try to invok it )

mypage.xhtml

<p:ajaxStatus onstart="PF('statusDialog').show()" onsuccess="PF('statusDialog').hide()" />
<h:form id="form">
...
 </h:form>

 <p:dialog widgetVar="statusDialog" modal="true" draggable="false" closable="false" resizable="false" showHeader="false">
        <p:graphicImage name="ajaxloadingbar.gif" library="images/myIcons" />
    </p:dialog>

Hope that helped you


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...