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
>
>

Reply via email to