【问题标题】:PrimeFaces dialog box not appearingPrimeFaces 对话框未出现
【发布时间】:2014-01-23 07:35:26
【问题描述】:

我正在使用 primefaces 4.0。我想使用对话框。当我使用它时,它会在加载时在同一页面中打印对话框内容。对话框未打开

<h:panelGrid columns="1" cellpadding="5">
    <p:commandButton id="basic" value="Basic" onclick="dlg.show()" type="button" />
</h:panelGrid>

<p:dialog id="basicDialog" header="Basic Dialog" widgetVar="dlg1">
   <h:outputText value="Resistance to PrimeFaces is futile!" />
</p:dialog>

也试过了

在 facesconfig.xml 中 org.primefaces.application.DialogActionListener org.primefaces.application.DialogNavigationHandler org.primefaces.application.DialogViewHandler

提前致谢

【问题讨论】:

  • dlg.show() 与 widgetVar (dlg1) 中的值不匹配。先尝试解决这个问题。
  • 应该是dlg1.show();
  • 即使在修复它不起作用之后
  • 我尝试使用 。这也不行
  • 已删除 type = "button" 仍然无法正常工作

标签: primefaces jsf-2.2


【解决方案1】:

我错过了添加 h:头

感谢大家的回复

【讨论】:

    猜你喜欢
    • 2013-05-17
    • 1970-01-01
    • 2013-04-28
    • 1970-01-01
    • 2013-06-28
    • 1970-01-01
    • 2017-04-08
    • 1970-01-01
    • 2017-09-07
    相关资源
    最近更新 更多