问题描述
我创建了一个带有primefaces 4.0的小型JSF Web项目.
I have created a small JSF web project with primefaces 4.0.
我使用一个基本模板,其中包含页眉和页脚.标题中有一个按钮,当按下按钮时会显示咆哮消息(p:growl元素).
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.
项目中有以下文件:
- index.xhtml:包含两个按钮,它们可以重定向/转发到另一个页面
所有其他页面使用基本模板(包括页眉和页脚).
All other pages uses the basic template (include header and footer).
如果我按 redirect.xhtml 页上的按钮一切正常,并且消息正确显示,但是如果我按转发上的按钮.xhtml 页面,什么都没发生.
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.
我创建了一个简单的日食项目,您可以在这里找到: GrowlRedirectForward. zip
I created a simple eclipse project which you can find here: GrowlRedirectForward.zip
推荐答案
问题可能是重定向和转发在后台工作的方式.请查看此链接一个潜在的解决方案.
Problem could be the way redirect and forward works behind the scenes. Have a look at this link for a potential solution.
这篇关于p:growl在JSF页面前进后不起作用,但是在页面重定向时起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!