I still dont see a complete decoupling or do you mean only getDefaultXxxx()?
So all the getModel() (Link/FormComponent) are still there?

For link we could have Link (without model) and ModelLink (generified
and with get/setModel) that would be fine with me.

On 7/2/08, Timo Rantalaiho <[EMAIL PROTECTED]> wrote:
> On Tue, 01 Jul 2008, Matej Knopp wrote:
>> There is one thing that helped me quite a lot when migration the
>> project I'm working out. I've created GenericPanel,
>> GenericWebMarkupContainer and GenericFragment classes. In most cases
>> the only change was renaming Panel<MyClass> to GenericPanel<MyClass>.
>
> Maybe the names could be TypedPanel / ModelContainingPanel
> or something like that?
>
> Or maybe start with the original component name so that they
> would pop up more easily in the IDE, for example
> PanelWithType / PanelWithModel?
>
>> I was wondering, even though those classes were farily simple, we
>> might want to include them in Wicket anyway, for the sake of
>> consistency and convenience.
>
> I thought about this and I think that it might be better to
> not include them after all. In 1.5 it would be great to
> separate IModel and Component more thoroughly, getting rid
> of the defaultModel* accessors. Then it would make less
> sense to have the convenience classes with those model and
> modelObject accessors.
>
> In cases where two components share the same model, it would
> make sense to make the IModel field in each component final.
> Then setModel() does not make sense any more; all it could
> do would be throw an exception or be a confusing no-op.
> Likewise, sometimes you never do setModelObject() or
> getModelObject() from outside the class.
>
> Leaner APIs and less methods per objects are good things.
> Hence it's better to add methods as you need them, instead
> of providing a lot of convenience stuff that is only used a
> part of the time. Surely each Component subclass has anyway
> a lot of methods, and MarkupContainers even more, but you
> have got to start somewhere :)
>
> This is not a big deal though, either way is fine by me.
>
> Best wishes,
> Timo
>
> --
> Timo Rantalaiho
> Reaktor Innovations Oy    <URL: http://www.ri.fi/ >
>
> ---------------------------------------------------------------------
> 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