a quick workaround, although maybe not a proper solution would be the
following:

... // somewhere in constructor
form.add(new DateField("myId", new PropertyModel(this, "calendarDate")));
...
}

private void setCalendarDate(Date date) {
  myCalendar.setTime(date);
}

private Date getCalendarDate() {
  return myCalendar.getTime();
}


On 8/3/07, Federico Fanton <[EMAIL PROTECTED]> wrote:
>
> Hi everyone!
> I just migrated to 1.3.0-beta2 from 1.2.6, and I'm trying to replace
> DatePicker's with DateField's, but I'm having a problem because the
> "backbean" of the CompoundPropertyModel of the containing form uses a
> Calendar field, not a Date one, so I'm receiving a conversion exception..
> I have a custom Converter in place that would handle the conversion, but
> it doesn't get called, because PropertyResolverConverter calls it only when
> there's a String involved in the conversion, while the DateField would need
> a "Date to Calendar" conversion..
> I thought of subclassing DateField and handling the conversion overriding
> setDate, but the "date" field inside DateField is private.. Any hint on what
> I could try?
> Many thanks for your time!
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to