pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Brown <gkbr...@mac.com>
Subject Re: Coercion between java.util.Date and org.apache.pivot.util.CalendarDate
Date Mon, 15 Nov 2010 00:46:15 GMT
That should work, but note that CalendarDate is not a UI class - it is part of the Core library,
which is UI-independent. So it should be OK to use in your model classes.

On Nov 14, 2010, at 12:29 PM, ocean ocean wrote:

> No, I'd rather not pollute my business domain with Pivot/UI classes. I did find something
called a Calendar.SelectedDateBindMapping. This seems to be a possible property I can set
on the CalendarButton. I will give this a shot.
> Thanks,
> On Sun, Nov 14, 2010 at 7:42 AM, Greg Brown <gkbrown@mac.com> wrote:
> Can you just use a CalendarDate in your data structure instead of java.util.Date?
> On Nov 13, 2010, at 6:58 PM, ocean ocean wrote:
> > I'm trying to Component.store() a domain java bean that exposes several java.util.Date
to a Form and getting coercion failures between java.util.Date and the pivot CalendarDate
class. This seems to be a pretty reasonable coercion to make but the static BeanAdapter.coerce
method doesn't take it into account and there doesn't seem to be a way to register my own
coercion logic on either the individual Form or globally. Any ideas? I figure somebody else
must've encountered this problem...

View raw message