0
我跟着特立尼达的导航开发指南中的第一个例子,但结果链接总是作为“#”出现。我仔细检查了他们可下载的例子,但没有看到任何区别。简单的特立尼达导航
Main.xhtml
<tr:page>
<f:facet name="menuSwitch">
<tr:navigationPane hint="button">
<tr:commandNavigationItem text="Home" action="nav_main" />
<tr:commandNavigationItem text="About" />
<tr:commandNavigationItem text="Login" action="nav_login" rendered="#{!loginBean.loginStatus}" />
<tr:commandNavigationItem text="Logut"
rendered="#{loginBean.loginStatus}" />
</tr:navigationPane>
...snip
</tr:page>
脸-config.xml中
<navigation-rule>
<navigation-case>
<from-outcome>nav_main</from-outcome>
<to-view-id>/main.xhtml</to-view-id>
<redirect/>
</navigation-case>
<navigation-case>
<from-outcome>nav_login</from-outcome>
<to-view-id>/login.xhtml</to-view-id>
<redirect/>
</navigation-case>
</navigation-rule>
无论是main.xhtml和login.xhtml坐在里面的WebContent,而不是埋另一个文件夹内。
我读此链接:http://myfaces.apache.org/trinidad/devguide/navigation.html