You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by lu...@att.net on 2012/08/20 19:28:08 UTC

Flash Scope msgs do not show up with immediate=true buttons

Hello,

I have the following button:

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


As part of the handler.actionDelete, I am adding a message to Flash Scope.

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

I do not see the flash message on the next screen when I press the command button. I will see the message if immediate is set to false.

I'm using MyFaces 2.1.8.

Any ideas?

Thanks,
Luis

Re: Flash Scope msgs do not show up with immediate=true buttons

Posted by Luis Roche <lu...@att.net>.
Sorry, somehow the email format in my previous email was wrong .

I have the following button:

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


As part of the handler.actionDelete, I am adding a message to Flash Scope.

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

I do not see the flash message on the next screen when I press the command button. I will see the message if immediate is set
to false.

I'm using MyFaces 2.1.8.

Any ideas?

Thanks,
Luis