Matej, I got and installed the latest SVN rev right before I sent the email. I should have some time Wed. to put together a quick test case for you. Should I just mimic one of the existing Junit tests or can I just send you a class & html file?
-- Karl -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Matej Knopp Sent: Tuesday, September 26, 2006 12:33 AM To: [email protected] Subject: Re: [Wicket-user] Problem Selecting Tree Nodes Please send a test case, I'll look at it. your code seems to be fine, it's nothing illegal, it can be bug in tree. Would you mind testing svn version first, it _might_ be already fixed. Thanks, -Matej Karl M. Davis wrote: > Matej, > > I'm getting an ArrayIndexOutOfBounds when I go to select a tree node > right after it has been inserted into the tree when I call > Tree.updateTree(target); (my tree model is firing the correct events). > If you'd like, I can get you a test case for this in a day or two, but > I just wanted to make sure I wasn't trying to do something I can't > first. > > *Dummy Code:* > myTreeModel.insertNewNode(parentNode, newNode); > myTree.getTreeState().selectNode(newNode, true); if(target != null) > myTree.updateTree(target); > > *Dump:* > 00:25:18.609 ERROR! [SocketListener0-1] > wicket.RequestCycle.step(RequestCycle.java:1009) >20> -2 > java.lang.ArrayIndexOutOfBoundsException: -2 at > java.util.ArrayList.get(ArrayList.java:323) > at > wicket.extensions.markup.html.tree.AbstractTree.updateTree(AbstractTre > e.java:753) > at > simplepersistence.feature.dynamicPages.PageEditorPanel$SaveButton.onSu > bmit(PageEditorPanel.java:240) > at > wicket.ajax.markup.html.form.AjaxSubmitButton$1.onSubmit(AjaxSubmitBut > ton.java:60) > at > wicket.ajax.form.AjaxFormSubmitBehavior.onEvent(AjaxFormSubmitBehavior > .java:92) at > wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java:167) > at > wicket.ajax.AbstractDefaultAjaxBehavior.onRequest(AbstractDefaultAjaxB > ehavior.java:236) > at > wicket.request.target.component.listener.BehaviorRequestTarget.process > Events(BehaviorRequestTarget.java:98) > at > wicket.request.compound.DefaultEventProcessorStrategy.processEvents(De > faultEventProcessorStrategy.java:65) > at > wicket.request.compound.AbstractCompoundRequestCycleProcessor.processE > vents(AbstractCompoundRequestCycleProcessor.java:57) > at > wicket.RequestCycle.doProcessEventsAndRespond(RequestCycle.java:862) > at wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:900) > at wicket.RequestCycle.step(RequestCycle.java:976) > at wicket.RequestCycle.steps(RequestCycle.java:1050) > at wicket.RequestCycle.request(RequestCycle.java:454) > at wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:217) > at wicket.protocol.http.WicketServlet.doPost(WicketServlet.java:260) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:616) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:689) > at > org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:428) > at > org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicatio > nHandler.java:473) at > org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:56 > 8) at org.mortbay.http.HttpContext.handle(HttpContext.java:1530) > at > org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationC > ontext.java:633) at > org.mortbay.http.HttpContext.handle(HttpContext.java:1482) > at org.mortbay.http.HttpServer.service(HttpServer.java:909) > at org.mortbay.http.HttpConnection.service(HttpConnection.java:820) > at > org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:986) > at org.mortbay.http.HttpConnection.handle(HttpConnection.java:837) > at > org.mortbay.http.SocketListener.handleConnection(SocketListener.java:2 > 45) at > org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357) > at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534) > > -- Karl > > > ---------------------------------------------------------------------- > -- > > ---------------------------------------------------------------------- > --- Take Surveys. Earn Cash. Influence the Future of IT Join > SourceForge.net's Techsay panel and you'll get the chance to share > your opinions on IT & business topics through brief surveys -- and > earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEV > DEV > > > ---------------------------------------------------------------------- > -- > > _______________________________________________ > Wicket-user mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/wicket-user ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Wicket-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/wicket-user ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Wicket-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/wicket-user
