我知道有一个名为“update”的属性,我可以这样使用它,update="another component's id"
,但是当它们处于不同的 <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”的站点中写入,它会重新渲染“display”的panelGrid?
最佳答案
您应该为<h:form>
提供一个ID 。这很重要,因为您必须引用像 formId:display
我的问题:Absolute reRendering using RichFaces ,检查我的答案。我也在 PrimeFaces 中对此进行了测试。
关于jsf - 如何在不同的 h 中重新渲染组件 :form?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4145475/