嗨,我正在使用js2+ primefaces 这是我阻止 UI 的代码
<table>
<h:form id="main">
<tr>
<p:growl --->
---
<p:dashboard id="board" model="#{adminD.userProfl}" disabled="true">
<p:panel id="adminActivity" header="Admin Activities">
<table id="hor-minimalist-b" >
<tbody>
<tr>
<td>
<h:commandLink action="#{photoValidation.ooDirectory()}" name="submit" type="submit" id="convertPhotos">
<h:outputText value="Convert All Photos in Databse "/>
<f:ajax execute=":main:adminActivity" render=":main:growl"/>
</h:commandLink>
</td>
</tr>
</tbody>
</table>
</p:panel>
</p:dashboard>
<p:blockUI block=":main:board" trigger=":main:convertPhotos">
LOADING<br />
<p:graphicImage value="#{facesContext.externalContext.requestContextPath}/resources/images/ajax-loader.gif"/>
</p:blockUI>
这里板是仪表板ID主要是表格ID
还实现了带有 5 秒 thread.sleep 的托管 bean