Bugs item #1209540, was opened at 2005-05-26 23:45
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=684975&aid=1209540&group_id=119783
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Gili Tzabari (cowwoc)
Assigned to: Nobody/Anonymous (nobody)
Summary: NPE is thrown if BoundCompoundModel not used when necessary
Initial Comment:
If you create a form where one of the fields is an
integer and you declare this by:
RequiredTextField someInt = new
RequiredTextField("someInt");
someInt.add(new TypeValidator(int.class));
wicket will throw a NPE as mentioned below unless you
*also* specify a BoundCompoundPropertyModel and bind
this property to type int. This should be cleaned up
some Wicket throws a useful error message explaining to
the user that there was a mismatch between the type
expected by the field validator and the type expected
by the model. The full stack-trace follows:
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:356)
at
wicket.protocol.http.WebRequestCycle.invokeInterface(WebRequestCycle.java:395)
at
wicket.protocol.http.WebRequestCycle.callComponentListener(WebRequestCycle.java:292)
at
wicket.protocol.http.WebRequestCycle.parseRequest(WebRequestCycle.java:124)
at wicket.RequestCycle.request(RequestCycle.java:372)
at
wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:225)
at
wicket.protocol.http.WicketServlet.doPost(WicketServlet.java:249)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:362)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:825)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:738)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:526)
at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)
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:585)
at
wicket.protocol.http.WebRequestCycle.invokeInterface(WebRequestCycle.java:347)
... 25 more
Caused by: java.lang.IllegalStateException: Attempt to
set model object on null model
at wicket.Component.setModelObject(Component.java:1137)
at
wicket.markup.html.form.TextField.updateModel(TextField.java:110)
at
wicket.markup.html.form.Form$11.formComponent(Form.java:551)
at
wicket.markup.html.form.Form$5.component(Form.java:416)
at
wicket.MarkupContainer.visitChildren(MarkupContainer.java:495)
at
wicket.markup.html.form.Form.visitFormComponents(Form.java:412)
at
wicket.markup.html.form.Form.updateFormComponentModels(Form.java:543)
at wicket.markup.html.form.Form.validate(Form.java:391)
at
wicket.markup.html.form.Form.onValidate(Form.java:342)
at
wicket.markup.html.form.Form.onFormSubmitted(Form.java:228)
at
wicket.markup.html.form.upload.UploadForm.onFormSubmitted(UploadForm.java:89)
... 30 more
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=684975&aid=1209540&group_id=119783
-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
_______________________________________________
Wicket-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-develop