I hate repeating myself and being the compiler's teacher. IMHO the
generics that are implemented in Java resulted in terrible code where
you have to repeat yourself over and over and over. Are you sure your
text field holds a String and your model returns a String?
TextField field = new TextField(
On Sun, Nov 15, 2009 at 11:39 AM, Martijn Dashorst <
martijn.dasho...@gmail.com> 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
im +1, unless Jeremy can tell why he believes it will hit a anti patter..
2009/11/16 Jeremy Thomerson
> On Sun, Nov 15, 2009 at 11:39 AM, Martijn Dashorst <
> martijn.dasho...@gmail.com> wrote:
>
> > i.e. ModelType.of()
> >
> > I am +1 for adding these methods.
> >
>
> I'm +1 for the model-t
I know it is an minor thing, but the creation act that the new keyword
exposes, the 'of' method don't has. IMO the simple fact of an method name
does not contain an verb is an anti-pattern.
On Tue, Nov 17, 2009 at 2:50 PM, nino martinez wael <
nino.martinez.w...@gmail.com> wrote:
> im +1, unless
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 Thome
not to mention that some components have 6 constructors, and that
means having 6 of methods :|
-igor
On Tue, Nov 17, 2009 at 9:33 AM, Jeremy Thomerson
wrote:
> 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("f
Argh, that is horrible. :(
2009/11/17 Igor Vaynberg
> not to mention that some components have 6 constructors, and that
> means having 6 of methods :|
>
> -igor
>
> On Tue, Nov 17, 2009 at 9:33 AM, Jeremy Thomerson
> wrote:
> > Because we'll get questions to the list like:
> >
> > How can I cr
oo,
> "property"));
>
> WDYT?
>
> Martijn
> --
> Become a Wicket expert, learn from the best: http://wicketinaction.com
> Apache Wicket 1.4 increases type safety for web applications
> Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.0
>
>
--
View this message in context:
http://old.nabble.com/Cutting-down-on-the-repetitive-type-identifiers-for-generics-tp26361334p26623904.html
Sent from the Wicket - Dev mailing list archive at Nabble.com.
hinking
> > they can't use the 'new' keyword.
> >
> > TextField field = TextField.of("someId", PropertyModel.of(foo,
> > "property"));
> >
> > WDYT?
> >
> > Martijn
> > --
> > Become a Wicket expert, learn fro
ng
>> > they can't use the 'new' keyword.
>> >
>> > TextField field = TextField.of("someId", PropertyModel.of(foo,
>> > "property"));
>> >
>> > WDYT?
>> >
>> > Martijn
>> > --
>> > Become a Wicket expert, learn from the best: http://wicketinaction.com
>> > Apache Wicket 1.4 increases type safety for web applications
>> > Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.0
>> >
>> >
>>
>> --
>> View this message in context:
>> http://old.nabble.com/Cutting-down-on-the-repetitive-type-identifiers-for-generics-tp26361334p26623904.html
>> Sent from the Wicket - Dev mailing list archive at Nabble.com.
>>
>>
>
10 matches
Mail list logo