如何在不同的h:form中重新渲染组件?

问题描述:

我知道有一个属性叫做“更新”,我可以像这样使用它,update="another component's id",但是当它们在不同的<h:form>标签中时,它不起作用。如何在不同的h:form中重新渲染组件?

例如,这样的代码,

<ui:composition> 
    <ui:define name=""> 

     <div> 

     <h:form> 

      <p:panel header=""> 
       <h:panelGrid id="display"> 
       </h:panelGrid> 
      </p:panel> 

     </h:form> 

     <h:form> 

      <p:dialog id="dialog"> 
       <p:dataTable onRowSelectUpdate="aa.bb.display"></p:dataTable> 
      </p:dialog> 

     </h:form> 

     </div> 

    </ui:define> 
</ui:composition> 

我的意思是,我怎么能在“aa.bb.display”的网站上写的,它会重新渲染“显示”的panelGrid的?

你应该给<h:form>一个ID。这很重要,因为你必须参考喜欢formId:display

我的问题在这:Absolute reRendering using RichFaces,检查我的答案。我也在PrimeFaces中测试了这一点。

+0

谢谢。有用。 – 2010-11-10 23:40:58