问题
I have created a small JSF web project with primefaces 4.0.
I use a basic template, which contains the header and footer. In the header there is a button which shows a growl message (p:growl element) when he gets pressed.
In the project there are following files:
- index.xhtml: Contains two buttons, which redirects/forwards to another page
All other pages uses the basic template (include header and footer).
If I press the button on the redirect.xhtml page everything is okay and the message is shown correctly, but If I press the button on the forward.xhtml page, nothing happens.
I created a simple eclipse project which you can find here: GrowlRedirectForward.zip
回答1:
Problem could be the way redirect and forward works behind the scenes. Have a look at this link for a potential solution.
来源:https://stackoverflow.com/questions/20925097/pgrowl-doesnt-work-after-jsf-page-forward-but-works-with-page-redirect