具有相对路径的JSF导航规则 [英] JSF Navigation Rules with Relative Paths
问题描述
说我在
www.foo.com/foo/bar/page.jsf
,并想定义一个导航规则以转到
and want to define a navigation rule to go to
www.foo.com/foo/
我将如何定义导航规则的< to-view-id>
.我以为会是这样:
how would I define the <to-view-id>
of the navigation rule. I thought it would be something like this:
<navigation-case>
<from-outcome>goToFoo</from-outcome>
<to-view-id>/../</to-view-id>
</navigation-case>
但是在调用时抛出解析器错误.我想我丢失了一些东西.有什么想法吗?
but that throws a parser error when called. I figure I am missing something. Any ideas?
推荐答案
JSF导航规则是相对于应用程序上下文的,而不是相对于当前页面的.如果 foo
是您的应用上下文,则/page.jsp
将始终转到 www.foo.com/foo/page.jsf
,而不是 www.foo.com/foo/bar/page.jsf
.
JSF navigation rules are relative to the application context, not relative to the current page. If foo
is your app context, then /page.jsp
will always go to www.foo.com/foo/page.jsf
, not www.foo.com/foo/bar/page.jsf
.
此外,我相信您必须参考实际页面,例如您必须包含 page.jsf
部分.
Also, I believe you must refer to actual pages e.g. you must include the page.jsf
portion.
这篇关于具有相对路径的JSF导航规则的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!