I need to block datatable when it's updating via ajax. I used blockUI component and it's show() and hide() methods. But it works only once! Where can be the problem? Thanks for help. Here is part of code:
<p:dialog resizable="false" showHeader="false" modal="false"
widgetVar="statusDialog" draggable="false" closable="false">
...
</p:dialog>
<p:panel>
<p:selectOneMenu id="source" value="#{mainBean.selectedSource}">
....
<p:ajax onstart="statusDialog.show(); feedBlock.show()"
oncomplete="statusDialog.hide(); feedBlock.hide()"
update="feed" listener="#{mainBean.filter(selectedSource, false)}"/>
</p:selectOneMenu>
</p:panel>
...
<p:dataTable id="feed" scrollable="true" scrollHeight="460"
value="#{mainBean.feed}" var="curr">
...
</p:dataTable>
<p:blockUI block="feed" widgetVar="feedBlock"/>
try
<p:blockUI block="feed" trigger="source"/>
and remove feedBlock.show()
and feedBlock.hide()
from p:ajax
you might need to change trigger="source"
into trigger="myform:source"
etc...
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.