English 中文(简体)
JSF 2.0 : 改变违约行为,从上页改为上页
原标题:JSF 2.0 : change default behaviour from page forward to page redirect

I know there are some advantages in using page forwarding as it is the default in JSF. I also know how to set redirect for some pages using faces-redirect in the implicit navigation or the tag in the faces-config file. I searched a lot on internet but I didn t find an easy and straight way (such as a configuration parameter) to enable redirect for all pages. The reason I would like to use page redirect everywhere is the following: if every page is asked whit its url the container can be used for page authorization without the need of additional security library. Don t know if it can be a good idea, but performances are not an issue in this moment and using container security can save development time for the first release.

最佳回答

您可以通过一种惯例<条码>做到这一点。 ConfigureableNavigationHandler 。 您可在对该问题的答复中找到一个实例:JSF 2和Redirect/Get?

然而,我感到,你重新设计页到页的导航方法是错误的。 你似乎正在使用《移动式航程》关于简单的逐页导航的要求。 如果你确定他们是GET的要求,那么你就不需要担心。 因此,使用<代码><h:link>,而不是<h:commandLink> for page-to-page Navigation。 因此,你不需要执行《行动计划》。 另见。 我何时应当使用:产出链接,而不是h:commandLink?

问题回答

暂无回答




相关问题
JSF a4j:support with h:selectManyCheckbox

I m having trouble with a JSF selectManyCheckbox and A4J support. The purpose is to run some action when a checkbox is selected. This works perfectly in Firefox. Yet, when testing in any IE (ie6 / ie7 ...

Mojarra for JSF Encoding

Can anyone teach me how to use mojarra to encode my JSF files. I downloaded mojarra and expected some kind of jar but what i had downloaded was a folder of files i don t know what to do with

如何拦截要求终止?

在共同基金中,如果用户要求终止,就需要采取一些行动。 我需要某种拦截器,但我不知道如何这样做。 我需要帮助。 增 编

ICEFaces inputFile getting the file content without upload

Is there any way of just getting the content of the browsed file without any upload/file transfer operations? I currently use ICEFaces inputFile component but I do not need the default uploading ...

Weird behaviour of h:commandLink action (MethodExpression)

I have two JSPs where I am displaying some info from database in a h:dataTable. One of them is showing all the info, and one of them user specifically. I have showXML.jsp that shows the "XML" column ...

How to correctly use ResultSet with h:dataTable

The problem is, that after displaying the ResultSet with <h:dataTable>, the connection is left open. If I close it, it closes the ResultSet too. I m thinking about copying the ResultSet data ...

热门标签