Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
180 views
in Technique[技术] by (71.8m points)

javascript - Can use AjaxStatus while The next Page Is Loading?

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

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

1 Reply

0 votes
by (71.8m points)

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...