Null Model Error
I have a List-Component and after sending a Form-Request it shows me the error: java.lang.IllegalStateException: Attempt to set model object on null model of component: mainPanel:taggingBereich:addTagging:taggingList at org.apache.wicket.Component.setDefaultModelObject(Component.java:3038) That's the specific List // Component taggingList = new ListMultipleChoiceInteger(taggingList, choices, renderer).setMaxRows(10); taggingList.setOutputMarkupId(true); // Setting Model choices.setObject(new ArrayListInteger(tagging.keySet())); // Model-Variable IModelList? extends Integer choices; // IChoiceRenderer renderer = new IChoiceRendererInteger() { public Object getDisplayValue(Integer arg0) { return tagging.get(arg0); } public String getIdValue(Integer arg0, int arg1) { return arg0.toString(); } }; choices = Model.of((ListInteger) new ArrayListInteger(tagging.keySet())); The of Method is crossed out by eclipse due to some reason I can't recognize -- But it works. Only after submitting the form I get this error (above) - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Null Model Error
you need to set the model for the list. On Fri, 2009-10-16 at 07:33 +, Peter Arnulf Lustig wrote: choices, - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
AW: Null Model Error
yes -- I do this here: choices = Model.of((ListInteger) new ArrayListInteger(tagging.keySet())); - Ursprüngliche Mail Von: Md. Jahid Shohel ja...@outscore.se An: users@wicket.apache.org Gesendet: Freitag, den 16. Oktober 2009, 9:53:01 Uhr Betreff: Re: Null Model Error you need to set the model for the list. On Fri, 2009-10-16 at 07:33 +, Peter Arnulf Lustig wrote: choices, - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
AW: AW: Null Model Error
can anyone tell me how to use the list-component model properly? - Ursprüngliche Mail Von: Peter Arnulf Lustig u...@yahoo.de An: users@wicket.apache.org Gesendet: Freitag, den 16. Oktober 2009, 9:55:19 Uhr Betreff: AW: Null Model Error yes -- I do this here: choices = Model.of((ListInteger) new ArrayListInteger(tagging.keySet())); - Ursprüngliche Mail Von: Md. Jahid Shohel ja...@outscore.se An: users@wicket.apache.org Gesendet: Freitag, den 16. Oktober 2009, 9:53:01 Uhr Betreff: Re: Null Model Error you need to set the model for the list. On Fri, 2009-10-16 at 07:33 +, Peter Arnulf Lustig wrote: choices, - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: AW: Null Model Error
You have a list of tagging keys that user can select and a render to it, but you don't have an model to receive the selection made on component. Consider to use this contructor parsing an putTheUserSelectionHereModel http://wicket.apache.org/docs/1.4/org/apache/wicket/markup/html/form/ListMultipleChoice.html#ListMultipleChoice%28java.lang.String,%20org.apache.wicket.model.IModel,%20org.apache.wicket.model.IModel,%20org.apache.wicket.markup.html.form.IChoiceRenderer%29 On Fri, Oct 16, 2009 at 6:52 AM, Peter Arnulf Lustig u...@yahoo.dewrote: can anyone tell me how to use the list-component model properly? - Ursprüngliche Mail Von: Peter Arnulf Lustig u...@yahoo.de An: users@wicket.apache.org Gesendet: Freitag, den 16. Oktober 2009, 9:55:19 Uhr Betreff: AW: Null Model Error yes -- I do this here: choices = Model.of((ListInteger) new ArrayListInteger(tagging.keySet())); - Ursprüngliche Mail Von: Md. Jahid Shohel ja...@outscore.se An: users@wicket.apache.org Gesendet: Freitag, den 16. Oktober 2009, 9:53:01 Uhr Betreff: Re: Null Model Error you need to set the model for the list. On Fri, 2009-10-16 at 07:33 +, Peter Arnulf Lustig wrote: choices, - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Pedro Henrique Oliveira dos Santos
AW: AW: Null Model Error
wow - great information But how can I create / define such a model -- I can't find anything in the wicket examples! - Ursprüngliche Mail Von: Pedro Santos pedros...@gmail.com An: users@wicket.apache.org Gesendet: Freitag, den 16. Oktober 2009, 13:24:45 Uhr Betreff: Re: AW: Null Model Error You have a list of tagging keys that user can select and a render to it, but you don't have an model to receive the selection made on component. Consider to use this contructor parsing an putTheUserSelectionHereModel http://wicket.apache.org/docs/1.4/org/apache/wicket/markup/html/form/ListMultipleChoice.html#ListMultipleChoice%28java.lang.String,%20org.apache.wicket.model.IModel,%20org.apache.wicket.model.IModel,%20org.apache.wicket.markup.html.form.IChoiceRenderer%29 On Fri, Oct 16, 2009 at 6:52 AM, Peter Arnulf Lustig u...@yahoo.dewrote: can anyone tell me how to use the list-component model properly? - Ursprüngliche Mail Von: Peter Arnulf Lustig u...@yahoo.de An: users@wicket.apache.org Gesendet: Freitag, den 16. Oktober 2009, 9:55:19 Uhr Betreff: AW: Null Model Error yes -- I do this here: choices = Model.of((ListInteger) new ArrayListInteger(tagging.keySet())); - Ursprüngliche Mail Von: Md. Jahid Shohel ja...@outscore.se An: users@wicket.apache.org Gesendet: Freitag, den 16. Oktober 2009, 9:53:01 Uhr Betreff: Re: Null Model Error you need to set the model for the list. On Fri, 2009-10-16 at 07:33 +, Peter Arnulf Lustig wrote: choices, - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Pedro Henrique Oliveira dos Santos - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: AW: Null Model Error
at javadoc: IModeljava.util.CollectionT model But how can I create / define such a model ? I have used org.apache.wicket.model.Model in one project for example like: new ListMultipleChoice(id, new Model(), choises, render) On Fri, Oct 16, 2009 at 9:00 AM, Peter Arnulf Lustig u...@yahoo.dewrote: wow - great information But how can I create / define such a model -- I can't find anything in the wicket examples! - Ursprüngliche Mail Von: Pedro Santos pedros...@gmail.com An: users@wicket.apache.org Gesendet: Freitag, den 16. Oktober 2009, 13:24:45 Uhr Betreff: Re: AW: Null Model Error You have a list of tagging keys that user can select and a render to it, but you don't have an model to receive the selection made on component. Consider to use this contructor parsing an putTheUserSelectionHereModel http://wicket.apache.org/docs/1.4/org/apache/wicket/markup/html/form/ListMultipleChoice.html#ListMultipleChoice%28java.lang.String,%20org.apache.wicket.model.IModel,%20org.apache.wicket.model.IModel,%20org.apache.wicket.markup.html.form.IChoiceRenderer%29 On Fri, Oct 16, 2009 at 6:52 AM, Peter Arnulf Lustig u...@yahoo.de wrote: can anyone tell me how to use the list-component model properly? - Ursprüngliche Mail Von: Peter Arnulf Lustig u...@yahoo.de An: users@wicket.apache.org Gesendet: Freitag, den 16. Oktober 2009, 9:55:19 Uhr Betreff: AW: Null Model Error yes -- I do this here: choices = Model.of((ListInteger) new ArrayListInteger(tagging.keySet())); - Ursprüngliche Mail Von: Md. Jahid Shohel ja...@outscore.se An: users@wicket.apache.org Gesendet: Freitag, den 16. Oktober 2009, 9:53:01 Uhr Betreff: Re: Null Model Error you need to set the model for the list. On Fri, 2009-10-16 at 07:33 +, Peter Arnulf Lustig wrote: choices, - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Pedro Henrique Oliveira dos Santos - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Pedro Henrique Oliveira dos Santos
AW: AW: Null Model Error
I thank you very much! - Ursprüngliche Mail Von: Pedro Santos pedros...@gmail.com An: users@wicket.apache.org Gesendet: Freitag, den 16. Oktober 2009, 14:13:46 Uhr Betreff: Re: AW: Null Model Error at javadoc: IModeljava.util.CollectionT model But how can I create / define such a model ? I have used org.apache.wicket.model.Model in one project for example like: new ListMultipleChoice(id, new Model(), choises, render) On Fri, Oct 16, 2009 at 9:00 AM, Peter Arnulf Lustig u...@yahoo.dewrote: wow - great information But how can I create / define such a model -- I can't find anything in the wicket examples! - Ursprüngliche Mail Von: Pedro Santos pedros...@gmail.com An: users@wicket.apache.org Gesendet: Freitag, den 16. Oktober 2009, 13:24:45 Uhr Betreff: Re: AW: Null Model Error You have a list of tagging keys that user can select and a render to it, but you don't have an model to receive the selection made on component. Consider to use this contructor parsing an putTheUserSelectionHereModel http://wicket.apache.org/docs/1.4/org/apache/wicket/markup/html/form/ListMultipleChoice.html#ListMultipleChoice%28java.lang.String,%20org.apache.wicket.model.IModel,%20org.apache.wicket.model.IModel,%20org.apache.wicket.markup.html.form.IChoiceRenderer%29 On Fri, Oct 16, 2009 at 6:52 AM, Peter Arnulf Lustig u...@yahoo.de wrote: can anyone tell me how to use the list-component model properly? - Ursprüngliche Mail Von: Peter Arnulf Lustig u...@yahoo.de An: users@wicket.apache.org Gesendet: Freitag, den 16. Oktober 2009, 9:55:19 Uhr Betreff: AW: Null Model Error yes -- I do this here: choices = Model.of((ListInteger) new ArrayListInteger(tagging.keySet())); - Ursprüngliche Mail Von: Md. Jahid Shohel ja...@outscore.se An: users@wicket.apache.org Gesendet: Freitag, den 16. Oktober 2009, 9:53:01 Uhr Betreff: Re: Null Model Error you need to set the model for the list. On Fri, 2009-10-16 at 07:33 +, Peter Arnulf Lustig wrote: choices, - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Pedro Henrique Oliveira dos Santos - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Pedro Henrique Oliveira dos Santos - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org