so that's what I just tried. a cover method to access the LocalDate

public NSTimestamp invoiceBDTimestamp() {
   DateTime dt = new DateTime(invoiceBookedDate().toString());
   NSTimestamp theIBDTS = new NSTimestamp(dt.getMillis());
         
   return theIBDTS;
}

Now I can access it as an NSTimestamp in iReport. Problem is gone.

Ted

--- On Tue, 2/1/11, Paul Hoadley <pa...@logicsquad.net> wrote:

> From: Paul Hoadley <pa...@logicsquad.net>
> Subject: Re: JasperReport LocalDate question
> To: "Theodore Petrosky" <tedp...@yahoo.com>
> Cc: "WebObjects-Dev Mailing List List" <webobjects-dev@lists.apple.com>
> Date: Tuesday, February 1, 2011, 5:35 PM
> With the caveat that I don't know
> anything about JR...
> 
> On 02/02/2011, at 1:08 AM, Theodore Petrosky wrote:
> 
> > I used the org.joda.time.LocalDate for the Field Class
> Definition.
> 
> Don't you want to be using your wrapper class for
> LocalDate, not Joda's LocalDate?  This name collision
> is unfortunate—when I borrowed the code from Henrique's
> sample project, I renamed the wrapper class to LSLocalDate
> to avoid just this confusion.  It's the wrapper class
> that's in your model, and that is presumably being handed to
> JR.
> 
> > I still get the compile time error that it can not
> cast from LocalDate to java.util.Date:
> 
> Of course, that doesn't explain why JR is still trying to
> cast it to a Date.  I just don't know enough to help
> there.
> 
> > So I tried changing to an NSTimestamp to see if I
> installed the jars correctly and Voila. No compilation
> errors. So it looks like Joda LocalDate does not Extend
> java.util.Date.
> 
> It certainly doesn't.  Nor does your wrapper
> class.  Nor should they.
> 
> > We have entered the world of, "I have no idea where to
> go now".
> 
> That's disappointing (mostly for you!), because the Joda
> LocalDate class works just fine as a custom attribute type,
> and solves exactly your original problem.  I'm sorry I
> don't know enough about JR to help you integrate it there.
> 
> 
> -- 
> Paul.
> 
> http://logicsquad.net/
> 
> 
> 



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to