|
I’m trying to implement a page with two
selection lists. The purpose is to have a control where one can move selected
choices between the two lists. With a little _javascript_ the movement of items
between the lists is easy, but the problem arises when the form embedding the
lists is submitted. If the Content in the lists are changed, wicket gives me a
runtime exception. I guess this has something to do with the change in number
of elements in the lists, and some checks against the model. I have used a ListMulitpleChoice
control like new
ListMultipleChoice("availableDomainRoles",userWeb.getAvailableDomainRoles()); I could create a class that extends
ListMultipleChoice. Are there any samples doing this, or are there another
approach to this that I have missed ? [2005-06-16 14:20:20,510] ERROR [PoolThread-49]
RequestCycle.onRuntimeException(561) | Unexpected runtime exception [page =
null] wicket.WicketRuntimeException: Method public
abstract void wicket.markup.html.form.IFormSubmitListener.onFormSubmitted() of
interface IFormSubmitListener threw an exception at
wicket.protocol.http.WebRequestCycle.invokeInterface(WebRequestCycle.java:348) at
wicket.protocol.http.WebRequestCycle.invokeInterface(WebRequestCycle.java:387) at
wicket.protocol.http.WebRequestCycle.callComponentListener(WebRequestCycle.java:284) at
wicket.protocol.http.WebRequestCycle.parseRequest(WebRequestCycle.java:122) at
wicket.RequestCycle.request(RequestCycle.java:372) at
wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:221) at wicket.protocol.http.WicketServlet.doPost(WicketServlet.java:245) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:358) at
org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:294) at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:567) at
org.mortbay.http.HttpContext.handle(HttpContext.java:1807) at
org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:525) 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) Caused by: java.lang.reflect.InvocationTargetException at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at
java.lang.reflect.Method.invoke(Method.java:324) at wicket.protocol.http.WebRequestCycle.invokeInterface(WebRequestCycle.java:339) ... 21 more Caused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 at
java.util.ArrayList.RangeCheck(ArrayList.java:507) at
java.util.ArrayList.get(ArrayList.java:324) at
wicket.markup.html.form.model.ChoiceList.get(ChoiceList.java:188) at
wicket.markup.html.form.model.ChoiceList.choiceForId(ChoiceList.java:154) at
wicket.markup.html.form.ListMultipleChoice.updateModel(ListMultipleChoice.java:188) at
wicket.markup.html.form.Form$12.formComponent(Form.java:546) at
wicket.markup.html.form.Form$6.component(Form.java:411) at
wicket.MarkupContainer.visitChildren(MarkupContainer.java:499) at
wicket.markup.html.form.Form.visitFormComponents(Form.java:407) at
wicket.markup.html.form.Form.updateFormComponentModels(Form.java:538) at
wicket.markup.html.form.Form.validate(Form.java:386) at
wicket.markup.html.form.Form.onValidate(Form.java:337) at
wicket.markup.html.form.Form.onFormSubmitted(Form.java:223) ... 26 more Jan-Petter ::-Q |
- [Wicket-user] ListMultipleChoice Kruger Jan Petter
- Re: [Wicket-user] ListMultipleChoice Eelco Hillenius
- RE: [Wicket-user] ListMultipleChoice Kruger Jan Petter
