如何重新加载<ui:include> </ui:include>

时间:2011-09-21 07:05:56

标签: java richfaces seam2 jsf-1.2

我们在ui:include中包含了一个页面。当点击一个按钮时,我们想要重新呈现ui:包含的页面。这是父页面;

<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>

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

0 个答案:

没有答案