Reputation: 661
Does it exist a way to create a <a name="bookmark">
in jsf?
I would like to create a list with general bookmarks so that i can point them with links, i would like to create these links with values I take dynamically. h:outputLink doesn't have a name attribute.
Upvotes: 0
Views: 617
Reputation: 2222
Using outputLink like this:
<h:outputLink id="bookmark" />
generates the html:
<a id="bookmark" href="" name="bookmark"/>
So you could use the ID as your pointer?
Upvotes: 2
Reputation: 146053
I think I would just use Javascript and patch up the anchors onload
.
However, you could do output filtering. You could wrap the sub components inside your own and parse and modify the output. That does seem like a lot more work than just tweaking the document with JS.
If you are willing to create a custom component using facelets, a true but heavyweight solution, just go over here: How to add a new attribute to an existing JSF component.
Upvotes: 0