Am 20.07.2011 19:38, schrieb [email protected]:
In the wicket example of Form Input (
http://wicketstuff.org/wicket14/forminput/
http://wicketstuff.org/wicket14/forminput/ ), I'm looking at the source and
can't make out what's happening with this line:
// display the multiply result
Label multiplyLabel = new Label("multiplyLabel", new
PropertyModel<Integer>(
getDefaultModel(), "multiply"));
I understand what this accomplishes, but I don't understand how. We're
passing this property model the default model of what exactly? I don't get
what it means to pass a property model a sublass of IModel to base itself
off of.
Thanks,
mike
--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/property-model-question-tp3681616p3681616.html
Sent from the Users forum mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
The property model is set formerly to the parent container (form or
panel) by constructor injection.
new Form("id", defaultModel);
or
new Panel("id", defaultModel);
If you check the hierachy of parent classes you can see the
getDefaultModel mthod implementation.
Cheers
Per
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]