Sorry for previews post, wrong combinations of pressed keys =/
I, will continue:
Hello everybody,
I'm using wicket 1.5-RC5.1 and I'm having problem to override
getConverter method of in a FormCompont subclass.
Well, lets say I have a TextField<Date> (I'm using j.u.Date here just
as example, could be any type) when I try to to provide a specific
converter for my instance I'm implementing like that:
TextField<String> tf = new TextField<String>("id") {
@Override
public IConverter<String> getConverter(Class<String> type) {
// ...
return converter;
}
};
But if I do like I get a compiler error saying:
"Name clash: The method getConverter(Class<String>) of type new
TextField<String>(){} has the same erasure as getConverter(Class<C>)
of type Component but does not override it"
"The method getConverter(Class<String>) of type new
TextField<String>(){} must override or implement a supertype method"
And when I try
TextField<String> tf = new TextField<String>("id") {
@Override
public <String> IConverter<String>
getConverter(Class<String> type) {
// ...
return converter;
}
};
I get a compilation warn saying:
"The type parameter String is hiding the type String"
I guess it happens 'cause getConverter uses a generic type C defined
at method level that is not the same generic type T defined at
TextField class level.
What is the proper way to overwrite getConverter method?
On Mon, Aug 15, 2011 at 8:57 AM, Fabio Cechinel Veronez
<[email protected]> wrote:
> Hello everybody,
>
> I'm using wicket 1.5-RC5.1 and I'm having problem to override
> getConverter method of in a FormCompont subclass.
>
> Well, lets say I have a TextField<Date> (I'm using j.u.Date here just
> as example, could be any type) when I try to to provide a specific
> converter for my instance I
>
> --
> Fabio Cechinel Veronez
>
--
Fabio Cechinel Veronez
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]