开发者

How to build a URL in the JSF page?

I'm trying to create a <a> tag in my Facelets XHTML page, but can't understand how to do it.. This is what I'm doing:

<h:outputLink value=开发者_高级运维"static/faq.xhtml">FAQ</h:outputLink>

Am I using the right tag?


This should work. Open page in webbrowser, rightclick and View Source to see the JSF-generated HTML output. You should see a <a> element being generated.

To learn what HTML the JSF components are rendering, head to the tag documentation. Here's a cite of relevance of the one for <h:outputLink>:

Render an HTML "a" anchor element. The value of the component is rendered as the value of the "href" attribute.


Simply use <a href="static/faq.xhtml">FAQ</a>.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜