If only... if only
we had this construct:

class Component<T default Void>
{
}

then all our problems with verbosity would be gone..

TextField tf = new TextField("id") // just default Void

Also only declare it once:

TextField<Stirng> tf = new TextField("id");


And both ways type guessing, so

TextField<String> tf = new TextField("id", new Model()); //textfield and
model are both just <String>
or
TextField tf = new TextField("id", new Model<String>()); // text field gets
the type of its given model..

I guess we should make a feature request for sun and then Vote on it with
all of us!
(and make noise on the internet...)

johan



On Tue, Jun 3, 2008 at 8:58 AM, Marcus Mattila <[EMAIL PROTECTED]>
wrote:

> > generics for formcomponents do not make sense, most of the time they
> > can figure out the type by inspecting their model. further, generics
> > did not get rid of the need to specify the type as a constructor
> > argument: new TextField<Integer>("num", Integer.class)
>
> Agreed.
>
> +1 for NOT generifying everything, because most components are "set it
> and forget it" => generifying everything is unnecessary clutter.
>
> I will continue to use Wicket whatever is decided, though :)
>
> -Marcus
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to