【问题标题】:How to show a different page in a lightBox(Primefaces), then when this page submitted back to the first page?如何在灯箱(Primefaces)中显示不同的页面,然后将该页面提交回第一页?
【发布时间】:2012-12-12 12:05:09
【问题描述】:

我想在对话框/灯箱(Primefaces)中显示不同的页面,并在该页面提交后返回第一页。

<h:link onclick="createUserDialog.show();" value="Create New User">
    <p:dialog widgetVar="createUserDialog" modal="true">
        <h:outputLink value="createUser.jsf" >
        <ui:include src="createUser.xhtml"></ui:include>
        </h:outputLink>
    </p:dialog>
</h:link>

【问题讨论】:

    标签: jsf-2 primefaces


    【解决方案1】:

    这样的?

    <p:commandLink onclick="createUserDialog.show();" value="Create New User" />
    <p:dialog widgetVar="createUserDialog" modal="true">
        <ui:include src="createUser.xhtml" />
    </p:dialog>
    

    在createUser.xhtml中:

    <h:body>
        <h:form>
            ...
            <p:commandButton value="button" oncomplete="createUserDialog.hide();" />
        </h:form>
    </h:body>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2018-03-12
      • 1970-01-01
      • 1970-01-01
      • 2013-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-11-13
      相关资源
      最近更新 更多