0
我想使用primefaces擴展阻止整個頁面使用blockUi標記。 回到這個展示案例primefaces extentions show case。根據itys描述,如果目標爲空或未定義,則整個頁面被阻止。 但是,當我ommit目標在GlassFish日誌表明javax.faces.FacesException: Cannot determinate target for blockUI component 'mainform:j_idt19'.
這裏是我的HTML代碼的一部分使用blockui阻止整個頁面
<h:body id="bodycontainer">
<h:form id="mainform">
<p:commandButton value="Extract" style="width: 8%;height: 100%" update="tableemails :confirmPurchase" id="extractbutton" ajax="true" widgetVar="ButtonExtract"
action="#{mailMB.searchEmails()}"
icon="ui-icon-disk" styleClass="ui-priority-primary"
onstart="blockUIWidget1.block()" oncomplete="blockUIWidget1.unblock(); purchase.show(); "/>
<pe:blockUI widgetVar="blockUIWidget1" >
<h:panelGrid columns="2">
<p:graphicImage url="pictures/loading_bar.gif" width="264" height="34" alt="animated-loading-bar"/>
<h:outputText value="Please wait..." style="white-space: nowrap;"/>
</h:panelGrid>
</pe:blockUI>
</p:panel>
</h:form>
</h:body>
我即使target=":bodycontainer"
嘗試,但在GlassFish服務器我得到javax.faces.FacesException: Cannot find target for blockUI component 'bodycontainer'
我更新了我的primefaces擴展到版本1.0.0但是,當我點擊CommandButton來顯示blockUi內容什麼都沒有出現,並且頁面好像正在加載... –