【问题标题】:Can I change posted xhtml page in primefaces?我可以更改在 primefaces 中发布的 xhtml 页面吗?
【发布时间】:2014-04-04 16:12:34
【问题描述】:

我知道标题很奇怪,但这是我的解释:

我有一个名为 main.xhtml 的主页。在 main.xhtml 中,包含另一个名为 dialog.xhtml 的页面。

主要:

   <ui:include src="../pages/dialog.xhtml"/>

   <p:commandLink onclick="DialogWidget.show(); return false;"
                   title="dialog" />

Dialog.xhtml 有一个对话框,当我单击主页中的按钮时,它会打开对话框。

当我在 chrome 中检查网络流量时,无论我在 dialog.xhtml 中做什么(比如打开带有创建按钮的面板)都会发布 main.xhtml。这会减慢系统速度。有没有办法在 dialog.xhtm 中的操作中发布 dialog.xhtml?我的意思是我可以像 main.xhtml 这样的新页面对待对话框吗?

【问题讨论】:

    标签: jsf jsf-2 primefaces dialog


    【解决方案1】:

    您应该尝试 Primefaces 的 Dialog Framework。它从支持 bean 的对话框中加载来自 xhtml 页面的内容。 以下是 primefaces 展示中的 2 个链接,可帮助您入门:

    基本 - https://www.primefaces.org/showcase/ui/df/basic.xhtml

    数据 - https://www.primefaces.org/showcase/ui/df/data.xhtml

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-10-11
      • 2010-09-19
      • 1970-01-01
      • 1970-01-01
      • 2015-10-10
      • 1970-01-01
      • 1970-01-01
      • 2016-12-04
      相关资源
      最近更新 更多