0

I want to rewrite this http address using JSF tag:

<a href="/module1/page/UserNavigation.html" class="dir">Home</a>

Into this:

<h:link value="HOME" class="dir" outcome="/module1/page/UserNavigation.xhtml" />

But when I test the page I get warning message Cannot match navigation case. That's because the address is pointing outside the module but it's correct.

Can I suppress that warning somehow?

4

1 回答 1

2

<h:link>标记仅用于通过在其属性中引用导航案例结果来为JSF 导航案例生成普通锚元素,并且不打算(不能)用于导航到任何其他资源,即使它们在同一web applcation,有标签。outcome<h:outputLink>

因此,您示例中的导航案例应该是/module1/page/UserNavigation. 另一方面,您可以将标签更改为<h:outputLink>并更改outcomevalue属性,它会顺利运行。

于 2013-04-25T21:41:32.213 回答