MultiPageMessagesSupport problem

Splash Forums PrettyFaces Users MultiPageMessagesSupport problem

This topic contains 4 replies, has 3 voices, and was last updated by 8 years, 4 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • #24711


    I’m new to PrettyFaces – but the tool is amazing. It solved a big problem we had.

    However I’ve configured the phase listener in faces-config.xml – and I see when debugging that messages are saved correctly – however to get the messages saved I had to add “?faces-redirect=true&includeViewParams=true” to my return statement. Originally I just returned “pretty:base” which worked fined for the navigation part, but messages where not stored – when using the code below to fix message problem I don’t get corret navigation:

    FacesContext.getCurrentInstance().addMessage( null, new FacesMessage( "Unknown store" ));
    return "UnknownStoreIdentifier?faces-redirect=true&includeViewParams=true";

    Output from browser:

    Unable to find matching navigation case with from-view-id ‘/pages/unsecure/main.xhtml’ for action ‘/pages/unsecure/main.xhtml’ with outcome ‘UnknownStoreIdentifier?faces-redirect=true&includeViewParams=true’


    <redirect />

    Hope that someone can help me. Thanks in advance.

    Best regards
    Søren Christensen


    Hmmm… Well, I can tell you that using JSF navigation is not entirely supported in PrettyFaces. Unfortunately once the JSF navigation system has been invoked, that means that all chance to intercept normal JSF navigation have passed already (thus once your faces-config.xml navigation cases are being evaluated, no extensions can intervene at this point since JSF is doing it’s default/native job.)

    However, It’s a bit strange to me that the messages would be lost. And even stranger that <redirect/> is not sufficient, and even more strange is the fact that adding ?faces-redirect=true would have any effect.

    I don’t think that your <from-outcome> should have anything other than UnknownStoreIdentifier – I don’t think the parameters should be included in your return statement, or in the config file since you are using the redirect tag.


    So instead I should be able to do like this?:



    If you are using JSF 2.0 or newer, you don’t need MultiPageMessagesSupport any more in most cases. You can use the flash scope, which is able to preserve the messages. See:


    Thanks. Using the flash scope works just fine.

Viewing 5 posts - 1 through 5 (of 5 total)

The forum ‘PrettyFaces Users’ is closed to new topics and replies.

Comments are closed.