In FormComponent class
/**
* subclasses would override it instead of getConverter(Class)
so no cast is necessary
*/
public IConverterT getFCConverter(ClassTtype)
{
// -- returns converter for FormComponent's type
return super.getConverter(type);
why getFCConverter would need a Class as parameter?
I mean, FormComponent whould be already known whether by getType or by
T type... wouldn't it?
On Mon, Sep 5, 2011 at 8:24 AM, vineet semwal
vineetsemwal1...@gmail.com wrote:
In FormComponent class
/**
* subclasses would override
i think it would need class because getConverter itself needs class
gettype() resolves class from the class name afaik ..
On Mon, Sep 5, 2011 at 5:17 PM, Fabio Cechinel Veronez
fabio.vero...@gmail.com wrote:
why getFCConverter would need a Class as parameter?
I mean, FormComponent whould
do you mean something like ( in FormComponent class or one subclass ) :
/**
* subclasses would override it instead of getConverter(Class)
so no cast is necessary
*/
protected IConverterT getConverter()
{
// -- returns
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 TextFieldDate (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
--
See how we do it at:
http://svn.apache.org/viewvc/wicket/trunk/wicket-datetime/src/main/java/org/apache/wicket/datetime/markup/html/form/DateTextField.java?view=markup
On Mon, Aug 15, 2011 at 2:57 PM, Fabio Cechinel Veronez
fabio.vero...@gmail.com wrote:
Hello everybody,
I'm using wicket
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 TextFieldDate (I'm using j.u.Date here just
as example,
Hello Martin, thanks for you prompt response..
I had saw that solution but it uses an unchecked cast that was
exactly what I was trying to avoid.
I guess generics were introduced just to avoid those types of casts.
On Mon, Aug 15, 2011 at 9:04 AM, Martin Grigorov mgrigo...@apache.org wrote:
If you find better solution please send it back to us :-)
On Mon, Aug 15, 2011 at 3:14 PM, Fabio Cechinel Veronez
fabio.vero...@gmail.com wrote:
Hello Martin, thanks for you prompt response..
I had saw that solution but it uses an unchecked cast that was
exactly what I was trying to avoid.
heheh ... well, in my opinion the best solution is to change
definition of Component.getConverter in way its generic type is bound
to FormComponent's T generic type ...
Is there any change to have it changed?
On Mon, Aug 15, 2011 at 9:24 AM, Martin Grigorov mgrigo...@apache.org wrote:
If you
Try it.
The problem is that getConverter(Class) is defined in Component which
has no type parametrization.
FormComponent extends Component and has the type but cannot break the
signature...
On Mon, Aug 15, 2011 at 3:33 PM, Fabio Cechinel Veronez
fabio.vero...@gmail.com wrote:
heheh ... well, in
the signature of method is public final C IConverterC
getConverter(ClassC clazz) ;
public IConverterString getConverter(ClassString type)
^^ means not overriding correctly as method signature is not the same
public String IConverterStringgetConverter(ClassString type)
now you
The real problem is that Component has no generics.
The tradeoff is that the library (FormComponents) do cast but all
users of them benefit without seeing this casting
On Mon, Aug 15, 2011 at 6:21 PM, vineet semwal
vineetsemwal1...@gmail.com wrote:
the signature of method is public final C
The real problem is that Component has no generics.
i agree with that so type parameter has to be used on the method
currently unless a new method is added in the FormComponent ,the older
method can just call the new method based on some conditional logic so
nothings get broken in core..,the users
sorry i just realized i goofed up while copying the method signature ..
there is no final in the method signature..
On Mon, Aug 15, 2011 at 8:51 PM, vineet semwal
vineetsemwal1...@gmail.com wrote:
the signature of method is public final C IConverterC
getConverter(ClassC clazz) ;
public
15 matches
Mail list logo