all components have a "default" model slot. this model is not used by
the component, it is just a container that is provided that provides
convinience such as detaching, etc.

compare a webmarkupcontainer to a formcomponent:

webmarkupcontainer does nothing with the model, but it is convinient
to still have a slot so users can easily set a model used by
subclasses or other usecases.

formcomponents actually use their model, eg they do not work without
it, thus they have a get/setmodel methods (in addition to
get/setdefaultmodel). in a formcomponent get/setmodel, however, are
generified because that information is known and useful.

in an ideal world we would not have the default model slot. you would
simply create an imodel field for a component if it needed a model,
but because of the way our compound models work this is a bit
tricky...something to think about for 1.5.

-igor

On Thu, Aug 28, 2008 at 7:30 AM, jWeekend <[EMAIL PROTECTED]> wrote:
>
> In Wicket 1.4m3, what does the "Default" in Component's new getDefaultModel()
> method mean.
> I don't want to reignite the generics debate; this is just a question about
> good naming. This name makes it sound like all components are initialised
> with a "default" model in place, or it could possibly be taken/interpreted
> in other, misleading/confusing ways.
>
> Regards - Cemal
> http://jWeekend.co.uk http://jWeekend.co.uk
> --
> View this message in context: 
> http://www.nabble.com/getDefaultModel-tp19201841p19201841.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to