Because we'll get questions to the list like:
How can I create my own component since I have to instantiate them using
Label.of("foo", PropertyModel.of(bar, "foo"))? How can I override that? Do
I have to override the static method "of"?
Sadly, I think that's what it will cause.
--
Jeremy Thomerson
http://www.wickettraining.com
On Tue, Nov 17, 2009 at 10:50 AM, nino martinez wael <
[email protected]> wrote:
> im +1, unless Jeremy can tell why he believes it will hit a anti patter..
>
> 2009/11/16 Jeremy Thomerson <[email protected]>
>
> > On Sun, Nov 15, 2009 at 11:39 AM, Martijn Dashorst <
> > [email protected]> wrote:
> >
> > > i.e. ModelType.of(....)
> > >
> > > I am +1 for adding these methods.
> > >
> >
> > I'm +1 for the model-type methods, although there are so many models that
> > are not final classes that it really won't save tons of code. Mainly in
> > the
> > *PropertyModel family.
> >
> >
> > > We can do the same for components, although the benefit is typically
> > > less, and it might even send our users down the wrong path thinking
> > > they can't use the 'new' keyword.
> > >
> > > TextField<String> field = TextField.of("someId", PropertyModel.of(foo,
> > > "property"));
> > >
> >
> > I'm -1 on doing it for components. I think it will lead to an
> > anti-pattern.
> >
> > --
> > Jeremy Thomerson
> > http://www.wickettraining.com
> >
>