Form form = new Form();
form.setModel(new MyCompoundModel);  // set a compound model so it is the root!
TextField tf = new TextField(); // no model!

then tf.initModel()  will get the forms model and use it as its own BUT it is not the root.

johan



On 11/14/05, Matej Knopp <[EMAIL PROTECTED]> wrote:
Sorry, I still don't understand.
What shoud I do if I want to have my own compound model, that is not
derived from CompoundPropertyModel? Why is in Component#setModel a
check, whether the model is instance of CompoundPropertyModel instand of
ICompoundModel?

-Matej

Johan Compagner wrote:
> No because components can have a ICompoundModel but not be the root because
> they got there model from the root. (see initModel())
>
> johan
>
>
>
> On 11/14/05, *Matej Knopp* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote:
>
>     Hi.
>
>     In Component class, the flag FLAG_HAS_ROOT_MODEL is set only if the
>     model is CompoundPropertyModel. Why do we have ICompoundModel then?
>
>     Shouldn't it only check if the model implements ICompoundModel?
>
>     -Matej
>
>
>     -------------------------------------------------------
>     SF.Net email is sponsored by:
>     Tame your development challenges with Apache's Geronimo App Server.
>     Download
>     it for free - -and be entered to win a 42" plasma tv or your very own
>     Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
>     _______________________________________________
>     Wicket-user mailing list
>     [email protected]
>     <mailto: [email protected]>
>     https://lists.sourceforge.net/lists/listinfo/wicket-user
>
>



-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to