You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by novotny <no...@gridsphere.org> on 2009/02/13 23:37:12 UTC
how to create a link that goes to an anchor on a page
Hi,
I have PageA and I want to create a link that takes me to an anchor on page
B like so:
Any content
So the link should look like PageB#label. How can I do this with
BookmarkablePageLink (or any link)?
I can set page parameters but it doesn't seem like that does what I need.
Thanks, Jason
--
View this message in context: http://www.nabble.com/how-to-create-a-link-that-goes-to-an-anchor-on-a-page-tp22006232p22006232.html
Sent from the Wicket - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: how to create a link that goes to an anchor on a page
Posted by Jeremy Thomerson <je...@wickettraining.com>.
Label label = new Label("label", "TEST");
Link yourLink = new Link("foo") { public void onClick() { /* do something */
} };
yourLink.setAnchor(label);
voila!
--
Jeremy Thomerson
http://www.wickettraining.com
On Fri, Feb 13, 2009 at 4:37 PM, novotny <no...@gridsphere.org> wrote:
>
> Hi,
>
> I have PageA and I want to create a link that takes me to an anchor on page
> B like so:
>
> Any content
>
> So the link should look like PageB#label. How can I do this with
> BookmarkablePageLink (or any link)?
>
> I can set page parameters but it doesn't seem like that does what I need.
>
> Thanks, Jason
> --
> View this message in context:
> http://www.nabble.com/how-to-create-a-link-that-goes-to-an-anchor-on-a-page-tp22006232p22006232.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>