【问题标题】:How to re-render component in a different h:form?如何以不同的 h:form 重新渲染组件?
【发布时间】:2011-05-07 22:12:10
【问题描述】:

我知道有一个名为“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?

【问题讨论】:

    标签: jsf jsf-2 facelets primefaces


    【解决方案1】:

    您应该为&lt;h:form&gt; 提供一个ID。这很重要,因为您必须参考formId:display

    我的问题:Absolute reRendering using RichFaces,请查看我的答案。我也在 PrimeFaces 中对此进行了测试。

    【讨论】:

      猜你喜欢
      • 2020-02-13
      • 2018-08-12
      • 1970-01-01
      • 2014-07-19
      • 1970-01-01
      • 2021-02-06
      • 2020-09-29
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多