You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Bruno Aranda <br...@gmail.com> on 2005/06/03 11:09:18 UTC
Re: Targeting fragment
Maybe this helps:
1) You could use an h:outputText to output not escaped HTML, like this:
<h:outputText value="<div id='#{cust.userId}'></div>"
escape="false"></h:outputText>
2) Then, you can use an h:outputLink, as you can use a standard url to navigate:
<h:outputLink value="#section_7">
<h:outputText value="Go to section 7"/>
</h:outputLink>
Hope this helps,
Bruno
2005/6/2, Darryl Parks <da...@parks.net>:
>
>
> I'd like to link to a fragment on the page, actually to a row in a
> datatable. Preferably I'd like to use commandLink. I've run into a couple
> of problems:
> 1) trying to name the segment using the following method:
> id="#{cust.userId}" forceId="true", gives an error saying the ID can't start
> with # -- so it's apparently not substituting the field value.
>
> 2) How do I link to a fragment? The norm under HTML is something like <a
> href="index.html#section_7" >, but under JSF navigation is through the
> config.xml.
>
> I've searched the newsgroup, without any luck. Any direction would be
> appreciated!
> Thanks,
> Darryl
>