Use Date instead of DateTime.

On Sat, Feb 23, 2008 at 11:56 PM, Fernando Wermus <[EMAIL PROTECTED]>
wrote:

> 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.
>



-- 
Ryan Gravener
http://ryangravener.com

Reply via email to