That looks to me like a bug. I assume you have several anchor tags in your menu and all them are enclosed by a single <wicket:link>? As <wicket:link> can be nested, a simple workaround could be to disable <wicket:link autolink=false> it for the failing link, because it is not required anyway for the page internal link.
I guess you know already wiki and examples? Juergen On 10/31/05, David Leangen <[EMAIL PROTECTED]> wrote: > > Hello! > > I just moved over from Tapestry. So, I understand the concept of how > Wicket works, but (1) I'm not yet familiar with the implementation > details, and (2) I'm not able to find detailed component documentation > anywhere... > > > My question is: how do I link to a target within a page, specifically > from the same page. > > For instance, I have a menu at the top that looks like: > > <a href="#link1">Link 1</a> > > And later in the same page: > > <a name="link1></a> > > > When I wrap the menu link with <wicket:link>, an NullPointerException is > thrown (stack trace below). > > > Thanks for the advice! > Dave > > > java.lang.NullPointerException > at wicket.markup.html.PackageResource.get > (PackageResource.java:144) > at wicket.markup.html.PackageResource.get > (PackageResource.java:122) > at wicket.AutoLinkResolver > $CssLink.<init>(AutoLinkResolver.java:368) > at wicket.AutoLinkResolver.resolveAutomaticLink > (AutoLinkResolver.java:224) > at wicket.AutoLinkResolver.resolve(AutoLinkResolver.java:94) > at wicket.MarkupContainer.renderNext(MarkupContainer.java:1139) > at wicket.MarkupContainer.renderComponentTagBody > (MarkupContainer.java:804) > at wicket.MarkupContainer.onComponentTagBody > (MarkupContainer.java:746) > at wicket.Component.renderComponent(Component.java:1886) > at wicket.markup.html.WebMarkupContainer.onRender > (WebMarkupContainer.java:77) > at wicket.Component.render(Component.java:1160) > at wicket.MarkupContainer.autoAdd(MarkupContainer.java:168) > at wicket.markup.html.WicketLinkResolver.resolve > (WicketLinkResolver.java:71) > at wicket.MarkupContainer.renderNext(MarkupContainer.java:1139) > at wicket.MarkupContainer.renderComponentTagBody > (MarkupContainer.java:804) > at wicket.MarkupContainer.onComponentTagBody > (MarkupContainer.java:746) > at wicket.Component.renderComponent(Component.java:1886) > at wicket.markup.html.WebMarkupContainer.onRender > (WebMarkupContainer.java:77) > at wicket.Component.render(Component.java:1160) > at wicket.MarkupContainer.autoAdd(MarkupContainer.java:168) > at wicket.markup.html.BodyOnLoadResolver.resolve > (BodyOnLoadResolver.java:67) > at wicket.MarkupContainer.renderNext(MarkupContainer.java:1139) > at wicket.MarkupContainer.renderAll(MarkupContainer.java:772) > at wicket.Page.onRender(Page.java:788) > at wicket.Component.render(Component.java:1160) > at wicket.Page.doRender(Page.java:251) > at wicket.RequestCycle.respond(RequestCycle.java:883) > at wicket.RequestCycle.request(RequestCycle.java:421) > at wicket.protocol.http.WicketServlet.doGet > (WicketServlet.java:197) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) > at com.bioscene.web.view.internal.app.BiosceneServlet.service > (BiosceneServlet.java:52) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) > at org.mortbay.jetty.servlet.ServletHolder.handle > (ServletHolder.java:358) > at org.mortbay.jetty.servlet.OsgiServletHandler.dispatch > (OsgiServletHandler.java:108) > at org.mortbay.jetty.servlet.ServletHandler.handle > (ServletHandler.java:567) > at org.mortbay.http.HttpContext.handle(HttpContext.java:1807) > at org.mortbay.http.HttpContext.handle(HttpContext.java:1757) > at org.mortbay.http.HttpServer.service(HttpServer.java:879) > at org.mortbay.http.HttpConnection.service > (HttpConnection.java:790) > at org.mortbay.http.HttpConnection.handleNext > (HttpConnection.java:961) > at org.mortbay.http.HttpConnection.handle > (HttpConnection.java:807) > at org.mortbay.http.SocketListener.handleConnection > (SocketListener.java:218) > at org.mortbay.util.ThreadedServer.handle > (ThreadedServer.java:300) > at org.mortbay.util.ThreadPool$PoolThread.run > (ThreadPool.java:511) > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by the JBoss Inc. > Get Certified Today * Register for a JBoss Training Course > Free Certification Exam for All Training Attendees Through End of 2005 > Visit http://www.jboss.com/services/certification for more information > _______________________________________________ > Wicket-user mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/wicket-user > ------------------------------------------------------- This SF.Net email is sponsored by the JBoss Inc. Get Certified Today * Register for a JBoss Training Course Free Certification Exam for All Training Attendees Through End of 2005 Visit http://www.jboss.com/services/certification for more information _______________________________________________ Wicket-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/wicket-user
