2) null models have a special meaning. if the component has a null model it will try to search up the component hierarchy tree to find a parent with a model that implements ICompoundModel and will then use that model as its own. this is useful for models like CompoundPropertyModel. see this discussion for details:
http://www.mail-archive.com/[email protected]/msg08877.html
On 1/20/06, Rosenstrauch, David <[EMAIL PROTECTED]
> wrote:
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Igor Vaynberg
Sent: Friday, January 20, 2006 1:37 PM
To: [email protected]
Subject: Re: [Wicket-user] RE: span tag clarificationthere are a couple of reasons for this.
1) there is really no good way for a component to assign a model to itself. the model is itself simply a locator for a value object that is used by the component. since form components are not limited to only working with String value objects there is no good way for a component to automatically figure out what value object you need. we havent implemented the "do what i mean" functionality yet, but we are working on it :)
[Rosenstrauch, David]? Why couldn't it just do what I'm doing? i.e.,public TextField(String id) {this(id, new Model());}public TextField(String id, IModel model) {...}DR==============================================================================
Please access the attached hyperlink for an important electronic communications disclaimer:
http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html
==============================================================================
