java.lang.IllegalArgumentException: Parameter modelObject cannot be null
Hello, I am creating a form, my form has an instance variable: private Organization organisation; Also, organisation is initialized in constructor with new Organisation(). Now I am creating a TextField, that uses the propertyModel: IModelOrganization m1 = new PropertyModelOrganization(organisation, entity.name); TextFieldOrganization organisationName = new TextFieldOrganization(organisationName, m1); organisationName.setRequired(true); add(organisationName); But when I load the page, I get: java.lang.IllegalArgumentException: Parameter modelObject cannot be null I have read the docs and manuals about models etc, but this thing here is really weird..
Re: java.lang.IllegalArgumentException: Parameter modelObject cannot be null
Also entity is initalized for that organisation object. On Mon, Jul 5, 2010 at 10:36 AM, Sigmar Muuga meedi...@gmail.com wrote: Hello, I am creating a form, my form has an instance variable: private Organization organisation; Also, organisation is initialized in constructor with new Organisation(). Now I am creating a TextField, that uses the propertyModel: IModelOrganization m1 = new PropertyModelOrganization(organisation, entity.name); TextFieldOrganization organisationName = new TextFieldOrganization(organisationName, m1); organisationName.setRequired(true); add(organisationName); But when I load the page, I get: java.lang.IllegalArgumentException: Parameter modelObject cannot be null I have read the docs and manuals about models etc, but this thing here is really weird..
Re: java.lang.IllegalArgumentException: Parameter modelObject cannot be null
Is in entity the field name also initialized? Try to set it to the empty String in the initialization of entity. Am 05.07.2010 09:37, schrieb Sigmar Muuga: Also entity is initalized for that organisation object. On Mon, Jul 5, 2010 at 10:36 AM, Sigmar Muuga meedi...@gmail.com wrote: Hello, I am creating a form, my form has an instance variable: private Organization organisation; Also, organisation is initialized in constructor with new Organisation(). Now I am creating a TextField, that uses the propertyModel: IModelOrganization m1 = new PropertyModelOrganization(organisation, entity.name); TextFieldOrganization organisationName = new TextFieldOrganization(organisationName, m1); organisationName.setRequired(true); add(organisationName); But when I load the page, I get: java.lang.IllegalArgumentException: Parameter modelObject cannot be null I have read the docs and manuals about models etc, but this thing here is really weird.. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
SV: java.lang.IllegalArgumentException: Parameter modelObject cannot be null
Also, organisation is initialized in constructor with new Organisation(). Does this initialization happen before or after you create the model? java.lang.IllegalArgumentException: Parameter modelObject cannot be null This error message indicates it happens after. - Tor Iver
Re: java.lang.IllegalArgumentException: Parameter modelObject cannot be null
Ok, sorry, my bad. I did the initialization afterwards :( Sometimes such mistakes just happen... On Mon, Jul 5, 2010 at 10:45 AM, Wilhelmsen Tor Iver toriv...@arrive.nowrote: Also, organisation is initialized in constructor with new Organisation(). Does this initialization happen before or after you create the model? java.lang.IllegalArgumentException: Parameter modelObject cannot be null This error message indicates it happens after. - Tor Iver