Hi all,
I got a parser error using DateTextField.
I am working with Joda-Time in my domain model. Thus I have some
DateTime attributes. According to this code which I found,
...
form.add(DateTextField.forDatePattern("datetime", new
PropertyModel(this, "datetime"), "MM/dd/yyyy"));
form.add(new DateTextField("date", new PropertyModel(this, "date"),
Date.class, new PatternDateConverter("MM/dd/yyyy", true)));
// form.add(DateTextField.forDatePattern("date", new
PropertyModel(this, "date"), "MM/dd/yyyy")); // will fail
...
I can use it perfectly; on the other hand, I found this comments in
DateTextField.class too,
* A TextField that is mapped to a <code>java.util.Date</code> object and
that uses Joda time to
* parse and format values.
I think I am misunderstanding something. Should I use always Date attributes
instead DateTime ones, and wicket-datetime use it just for conversion, or
can I use in my wicket-models?
--
Fernando Wermus.