DatePicker and DateTextField

classic Classic list List threaded Threaded
3 messages Options
yka
Reply | Threaded
Open this post in threaded view
|

DatePicker and DateTextField

yka
Hi all,

following one line creates pain in my head:
        DateTextField finalDate = new DateTextField("date",
                new PropertyModel<Date>(invoice.getObject().getDate(),
                        "date"), new StyleDateConverter("S-", true));

Wenn I try to open the corresponding page I get

Root cause:

java.lang.LinkageError: loader constraint violation: when resolving method org.apache.wicket.datetime.markup.html.form.DateTextField.<init>(Ljava/lang/String;Lorg/apache/wicket/model/IModel;Lorg/apache/wicket/datetime/DateConverter;)V"
the class loader (instance of org/apache/catalina/loader/WebappClassLoader) of the current class, com/invoice/CreateInvoice,
and the class loader (instance of org/apache/catalina/loader/StandardClassLoader) for resolved class, org/apache/wicket/datetime/markup/html/form/DateTextField,
have different Class objects for the type org/apache/wicket/model/IModel used in the signature


The message is more or less clear. But how to avoid it? What did I wrong?

Cheers,
Y
yka
Reply | Threaded
Open this post in threaded view
|

Re: DatePicker and DateTextField

yka
Nobody had this kind of problem before?
Reply | Threaded
Open this post in threaded view
|

Re: DatePicker and DateTextField

Hans Lesmeister 2
In reply to this post by yka
Hi,

This looks suspicous to me:
new PropertyModel<Date>(invoice.getObject().getDate(), "date")

Shouldn't that be
new PropertyModel<Date>(invoice.getObject(), "date")?

--
Regards,
Hans

http://cantaa.de