2

我们包含了一个带有 ui:include 的页面。当一个按钮被点击时,我们也想重新渲染 ui:included 页面。这是父页面;

<h:form id="mainForm">
        <a4j:region rendered="#{dealHome.editMode}">
            <ui:include src="/createEditDeal.xhtml">
                <ui:param name="id" value="#{dealHome.instance.id}" />
            </ui:include>
        </a4j:region>
        <a4j:region rendered="#{not dealHome.editMode}">
            <ui:include src="/readDeal.xhtml">
                <ui:param name="id" value="#{dealHome.instance.id}" />
            </ui:include>
        </a4j:region>
        <s:div rendered="#{dealHome.editMode}">
            <a4j:commandButton action="#{dealHome.persist()}" value="+"
                id="btnTagAdd" reRender="mainForm" />
        </s:div>
        <s:div rendered="#{not dealHome.editMode}">
            <a4j:commandButton id="btnModeChange" value="Edit"
                action="#{dealHome.changeMode()}" reRender="mainForm" />
        </s:div>
    </h:form>

任何帮助或建议将不胜感激。

4

0 回答 0