...
These benefits are a great asset to Wicket. Wicket uses the concept of models to provide components with the data that needs to be rendered. Until recently Wicket was Java 1.4 based, and a lot of components suffered from the lack of generified models. Take for instance the ListView
:
Generics Suck!
TBD
Suggestion 1 - setResponsePage()
signature
The initial issue that started this discussion was a problem with this method signature:
...
My idea is to dial back the generics on some of the API calls like this one and others that cause pain, but leave the generics for useful things like getModelObject().
-Doug Donohoe
...
This is already resolved with the following signature:
Code Block |
---|
public final <C extends Page<?>> void setResponsePage(final Class<C> cls, PageParameters parameters)
{
getRequestCycle().setResponsePage(cls, parameters);
}
|
Gerolf Seitz
Suggestion 2 - RestartResponseAtInterceptPageException constructor
I agree with Doug, and with suggestion 1 above on setResponsePage changing to take Class<?>
...
This, for the same reason as suggestion 1 - it's not very likely that someone is going to pass a non-page-child class into these methods or constructors, so the benefit is minimal, but the strictly generified versions penalize you if your page class is not also generified, which would be confusing to new users.
...
Same as above. -Gerolf Seitz