You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Alexandre Poitras <al...@gmail.com> on 2006/04/13 21:21:24 UTC

How to link inside the current page

Hello,

I have a little problem that I can't solve and it's really bugging me
so I hope someone here know the answer. I am trying to send the user
back to the current page but to a given position. Using a pure html
approach I would usually do something like href="#id" but he doesn't
seems to work with the action attribute. So anyone knows how I might
be able to do this?

Thank a lot!

--
Alexandre Poitras
Québec, Canada

Re: How to link inside the current page

Posted by Alexandre Poitras <al...@gmail.com>.
Thank for the info but I prefer to try to use the href approach first.
I have strict restrictions on the outputted xhtml.

On 4/13/06, Mike Kienenberger <mk...@gmail.com> wrote:
> On 4/13/06, Alexandre Poitras <al...@gmail.com> wrote:
> > I have a little problem that I can't solve and it's really bugging me
> > so I hope someone here know the answer. I am trying to send the user
> > back to the current page but to a given position. Using a pure html
> > approach I would usually do something like href="#id" but he doesn't
> > seems to work with the action attribute. So anyone knows how I might
> > be able to do this?
>
> The myfaces autoscroll setting should be able to do this for you.
> However, being a javascript-novice, I was never able to figure out how
> to do it myself.
>
> For some browsers, setting the focus will also scroll to the active
> control on a given page.   Sandbox focus shows how.   Not sure if
> that's helpful for your browser target, though.
>


--
Alexandre Poitras
Québec, Canada

Re: How to link inside the current page

Posted by Mike Kienenberger <mk...@gmail.com>.
On 4/13/06, Alexandre Poitras <al...@gmail.com> wrote:
> I have a little problem that I can't solve and it's really bugging me
> so I hope someone here know the answer. I am trying to send the user
> back to the current page but to a given position. Using a pure html
> approach I would usually do something like href="#id" but he doesn't
> seems to work with the action attribute. So anyone knows how I might
> be able to do this?

The myfaces autoscroll setting should be able to do this for you.  
However, being a javascript-novice, I was never able to figure out how
to do it myself.

For some browsers, setting the focus will also scroll to the active
control on a given page.   Sandbox focus shows how.   Not sure if
that's helpful for your browser target, though.

Re: How to link inside the current page

Posted by Alexandre Poitras <al...@gmail.com>.
Yeah unfortunately I am trying to do this using a custom component
which extend UICommand. I guess I should take a look at outputLink
source code to see how they handle this case.

On 4/13/06, vace117 <va...@yahoo.ca> wrote:
>
> I have nver tried this myself, but <h:outputLink/> tag may be what you want.
> Hope this helps.
> --
> View this message in context: http://www.nabble.com/How-to-link-inside-the-current-page-t1446353.html#a3907154
> Sent from the MyFaces - Users forum at Nabble.com.
>
>


--
Alexandre Poitras
Québec, Canada

Re: How to link inside the current page

Posted by vace117 <va...@yahoo.ca>.
I have nver tried this myself, but <h:outputLink/> tag may be what you want.
Hope this helps.
--
View this message in context: http://www.nabble.com/How-to-link-inside-the-current-page-t1446353.html#a3907154
Sent from the MyFaces - Users forum at Nabble.com.