PrimeFaces:阻止Ui无法正常工作

时间:2013-01-24 07:46:03

标签: jsf-2 primefaces

您好我正在使用 js2 + primefaces 这里是我阻止用户界面的代码

<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

还实现了托管bean,thread.sleep为5秒

3 个答案:

答案 0 :(得分:0)

删除所有:main:前缀,因为所有这些都位于同一h:form内,无需添加main前缀

使用

<p:blockUI block="board" trigger="convertPhotos">

答案 1 :(得分:0)

尝试将h:commandLink更改为p:commandLink:

<p:commandLink actionListener="#{photoValidation.ooDirectory()}"  update=":main:growl"   id="convertPhotos"><h:outputText value="Convert All Photos in Databse "/></p:commandLink>

答案 2 :(得分:0)

你能试试这段代码吗?

<p:blockUI block="board" trigger="adminActivity:convertPhotos">

它只是tipp但您可以通过firebug或浏览器中的其他Web工具找到组件元素。

相关问题