« Return to Thread: users, please give us your opinion: what is your take on generics with Wicket

Re: users, please give us your opinion: what is your take on generics with Wicket

by Jan Kriesten :: Rate this Message:

Reply to Author | View in Thread


hi sebastiaan,

> You could use Java's covariant return types to override getModel() to
> return a specific type. Which would mean that you would need to subclass
> to "simulate" generics (with a new subclass for each type).

not really, you can do generify your components from a certain level and
wouldn't have to subclass for each type. that way you could require
formcomponents to have generics on them, without the whole component tree
generified.

but i guess this would also lead to many questions why this and not that...

i'd prefer living with have to cast when it comes to getModel/getModelObject...

regards, --- jan.



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...

 « Return to Thread: users, please give us your opinion: what is your take on generics with Wicket