Hi, Case 1) both the link and the anchor are in the same page (Page1) To be able to use Link#setAnchor(Component) you need to use a Label component for the anchor and pass it to link: link.setAnchor(label)
Case 2) the link is in Page1 and the anchor in is Page2 Use a BookmarkablePageLink and override its #getURL() method and just append '#anchor' to the returned url from super.getURL(); On Wed, Sep 26, 2012 at 11:18 AM, Dmitriy Neretin <dmitriy.nere...@googlemail.com> wrote: > Hi Folks, > > I don't really unterstand how to do it. > > I have two Wicket Pages: Page1 and Page2 > > On the Page1 I define the Label, wich will be contain the anchor "id". So > now I want to define a link on the Page1, wich will get > setResponsePage(Page1) but I also want that the user will be forwarded to > the anchor on the Page1! > > What I don't understand ist how to do it in a right way :)? hot to set > link.setAnchor(anchorComponentFromThePage1)??? > > Thank You! -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org