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?
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.