You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by NickCanada <nm...@ucalgary.ca> on 2008/11/12 22:48:18 UTC
Wicket upload example in latest snapshot (1.4) has exception
In the bleeding edge SVN update (1.4) I can the following error when using
the file upload field. I get the same error in the Wicket Examples built
with the above:
WicketMessage: Method onFormSubmitted of interface
org.apache.wicket.markup.html.form.IFormSubmitListener targeted at component
[MarkupContainer [Component id = simpleUpload]] threw an exception
Root cause:
java.lang.IllegalStateException: Attempt to set model object on null model
of component: simpleUpload:fileInput
at org.apache.wicket.Component.setDefaultModelObject(Component.java:2936)
at
org.apache.wicket.markup.html.form.FormComponent.updateModel(FormComponent.java:1149)
at
org.apache.wicket.markup.html.form.Form$FormModelUpdateVisitor.component(Form.java:223)
at
org.apache.wicket.markup.html.form.FormComponent.visitComponentsPostOrderHelper(FormComponent.java:495)
at
org.apache.wicket.markup.html.form.FormComponent.visitComponentsPostOrderHelper(FormComponent.java:474)
at
org.apache.wicket.markup.html.form.FormComponent.visitComponentsPostOrder(FormComponent.java:451)
at
org.apache.wicket.markup.html.form.Form.internalUpdateFormComponentModels(Form.java:1947)
at
org.apache.wicket.markup.html.form.Form.updateFormComponentModels(Form.java:1915)
at org.apache.wicket.markup.html.form.Form.process(Form.java:957)
at org.apache.wicket.markup.html.form.Form.process(Form.java:905)
at org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:873)
...................
I hope it is not a configuration error on my part. I don't have enough
expertise to submit a patch. Hopefully some person greater have a look.
Cheers
--
View this message in context: http://www.nabble.com/Wicket-upload-example-in-latest-snapshot-%281.4%29-has-exception-tp20469979p20469979.html
Sent from the Wicket - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Wicket upload example in latest snapshot (1.4) has exception
Posted by Xhelas <xh...@yahoo.fr>.
This indeed happens in 1.4-rc1 and it did not happened in 1.4-m3. Another fix
is to override the updateModel method of FileUploadField in "neutralize" it.
Regards.
Alexandre
NickCanada wrote:
>
> Apologies -after a more thorough search of the issue the following thread
> addresses the issue:
> http://www.nabble.com/FileUpload---need-to-set-a-model-to-get-updateModel-working--td19283571.html#a19312573
>
> from UploadPage.java in the examples:
>
> add(fileUploadField = new FileUploadField("fileInput"));
>
> changing the line to something like
>
> add(fileUploadField = new FileUploadField("fileInput",new Model()));
>
> makes it work
>
> Thanks
>
--
View this message in context: http://www.nabble.com/Wicket-upload-example-in-latest-snapshot-%281.4%29-has-exception-tp20469979p20498026.html
Sent from the Wicket - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Wicket upload example in latest snapshot (1.4) has exception
Posted by NickCanada <nm...@ucalgary.ca>.
Apologies -after a more thorough search of the issue the following thread
addresses the issue:
http://www.nabble.com/FileUpload---need-to-set-a-model-to-get-updateModel-working--td19283571.html#a19312573
from UploadPage.java in the examples:
add(fileUploadField = new FileUploadField("fileInput"));
changing the line to something like
add(fileUploadField = new FileUploadField("fileInput",new Model()));
makes it work
Thanks
--
View this message in context: http://www.nabble.com/Wicket-upload-example-in-latest-snapshot-%281.4%29-has-exception-tp20469979p20486971.html
Sent from the Wicket - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org