Bruno,
Thanks for the help -- this gets me part of the way and solves the fragment naming. (part 1)
I need to be a little more explicit about what I'm trying to accomplish. It is pretty standard master-detail approach: I present a list, allow the user to select an item and take them to a detail screen. But when a save button is pressed on the detail screen, after saving the updates I would like to direct the page back to the Listing screen and have it scroll to the item just edited. This is a dynamic list and so I can't hard code links and if I directly link in html, I lose any changes made on the detail screen.
Essentially is there a way to modify the faces-config.xml to allow a dynamic target or bypass it and send directly to the page like this: Listing.jsf#dynamicId?
Thanks again,
Darryl
----- Original Message -----
From: "Bruno Aranda" <[EMAIL PROTECTED]>
To: "MyFaces Discussion"
Subject: Re: Targeting fragment
Date: Fri, 3 Jun 2005 11:09:18 +0200
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 <[EMAIL PROTECTED]>:
>
>
> 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="" >, but under JSF navigation is through the
> config.xml. I've searched the newsgroup, without any luck. Any direction
> would be
> appreciated!
> Thanks,
> Darryl
>

