admin管理员组文章数量:1402407
I used the same one as in primefaces which is: .jsf
<p:ajaxStatus onstart="statusDialog.show();" onsuccess="statusDialog.hide();"/>
<p:dialog modal="true" widgetVar="statusDialog" header="Status"
draggable="false" closable="false">
<p:graphicImage value="/design/ajaxloadingbar.gif" />
</p:dialog>
my page never shows the content if this piece of code exists. When I inspect with firebug, the js error is Uncaught ReferenceError: statusDialog is not defined.
I used the same one as in primefaces which is: http://www.primefaces/showcase/ui/ajaxStatusScript.jsf
<p:ajaxStatus onstart="statusDialog.show();" onsuccess="statusDialog.hide();"/>
<p:dialog modal="true" widgetVar="statusDialog" header="Status"
draggable="false" closable="false">
<p:graphicImage value="/design/ajaxloadingbar.gif" />
</p:dialog>
my page never shows the content if this piece of code exists. When I inspect with firebug, the js error is Uncaught ReferenceError: statusDialog is not defined.
Share Improve this question asked Feb 13, 2014 at 15:15 Gary LeatherGary Leather 3812 gold badges6 silver badges18 bronze badges 4- Not sure of what exactly happening but instead you can have your ajaxStatus like this <p:ajaxStatus> <f:facet name="start"> <p:graphicImage value="ajaxloading.gif" /> </f:facet> </p:ajaxStatus> – Srikanth Ganji Commented Feb 13, 2014 at 15:26
- but with this I can not show effect as dialog. – Gary Leather Commented Feb 13, 2014 at 15:37
- check the diference <p:ajaxStatus onstart="PF('statusDialog').show();" onsuccess="PF('statusDialog').hide();"/> – meyquel Commented Feb 13, 2014 at 17:13
- maybe you can use BlockUI ponent, primefaces/showcase-ext/views/home.jsf – meyquel Commented Feb 13, 2014 at 17:15
1 Answer
Reset to default 8What Primefaces´ version are you using?
Primefaces from 4 to 5 changed the way to access widget ponents:
Widgets must be referenced via "PF". e.g. PF('widgetVarName').show() instead of widgetVarName.show();
https://code.google./p/primefaces/wiki/MigrationGuide
本文标签: javascriptPrimefaces ajaxstatus error(dialog is not defined)Stack Overflow
版权声明:本文标题:javascript - Primefaces ajaxstatus error(dialog is not defined) - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744335975a2601192.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论