Hmm... ok,
does that mean, in forms I do not have to wrap my model(object) into a 
CompundPropertyModel, because DropDownList (or even all FormComponents?) 
automatically joins IComponentInheritedModel hierarchy?

So, as conclusion, by using a constuctor with an empty model (id, new 
Model(), List choices) a exclude my DropDownChoice from the hierarchy?

Patrick

Am 26.09.2013 09:47, schrieb Martin Grigorov:
> Hi,
>
> This use case will work only when the DropDownChoice has a parent in the
> hierarchy with org.apache.wicket.model.IComponentInheritedModel,
> like org.apache.wicket.model.CompoundPropertyModel.
> In this case the dropdown will use a slot from its parent's
> IComponentInheritedModel.
>
>
> On Thu, Sep 26, 2013 at 9:39 AM, Patrick Davids 
> <patrick.dav...@nuboit.de>wrote:
>
>> Hi all,
>>
>> since I'm working with Wicket I am a bit confused about the Constructors
>> of DropDownChoice Class.
>>
>> DropDownChoice provides Constructors without any Model or ModelObject.
>> e.g. (id, List choices)
>>
>> This is logical in an use-case, for instance, having just a page with a
>> SelectBox and my first click is about to choose something.
>> And I may do not have any "parent" model object of the page, so I did
>> not bind my DropDownChoice by PropertyModel expressions.
>>
>> So, in such cases...
>>
>> Why Wicket always complaints about "try to set ModelObject of null model"?
>>
>> Yes, I explicitly decided to use DropDownChoice without a model.
>> Since nothing is chosen, the model object of the DropDownChoice is null.
>> The behavior I expect is, the model object is the chosen option (object)
>> after selecting one.
>>
>> But it seems, it does not work like this.
>>
>> Can someone please "light" me. :-)
>>
>> kind regards
>> Patrick
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>

-- 
Mit freundlichen Grüßen,

Patrick Davids

NuboIT GmbH & Co. KG
Kieler Str. 103-107 • 25474 Bönningstedt

Email: patrick.dav...@nuboit.de

Handelsregister: HRA6819 Pi  | Amtsgericht Pinneberg

Geschäftsführung der Verwaltungsgesellschaft
Daniel Fraga Zander

HRB10145Pi | Amtsgericht Pinneberg
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to