【问题标题】:Flash Scope msgs do not show up with immediate=true buttonsFlash Scope 消息不显示为 immediate=true 按钮
【发布时间】:2012-08-16 01:03:21
【问题描述】:

我有以下按钮:

<h:commandButton action="#{handler.actionDelete}" value="Delete" immediate="true"/>

作为 handler.actionDelete 的一部分,我正在向 Flash Scope 添加一条消息。

public String actionDelete() {
this.service.delete(this.bean);
FacesContext.getCurrentInstance().getExternalContext().getFlash().put("infoMessage","OK");
return "NextPage?faces-redirect=true";

}

当我按下命令按钮时,我没有在下一个屏幕上看到闪现消息。如果 immediate 设置为 false,我会看到消息。

我正在使用 MyFaces 2.1.8。

有什么想法吗?

谢谢, 路易斯

【问题讨论】:

    标签: jsf-2 myfaces


    【解决方案1】:

    我可以重现您的问题。这可能是 MyFaces 中的一个错误。你需要 report 给 MyFaces 的人。

    它在 Mojarra 2.1.12 中运行良好。

    【讨论】:

      猜你喜欢
      • 2013-01-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-11-02
      • 2019-11-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多