Good idea Kozura.  So I went ahead and added this line to the code:
"java.sql.Date testThisType = new java.sql.Date(new
Date().getTime());"
the typeId$ is 179.  So to answer your question no it's not
transmitting it as a java.sql.Date.

On Apr 28, 10:14 pm, kozura <[email protected]> wrote:
> Any chance the RPC transmitted type is java.sql.Date?
>
> On Apr 28, 4:24 pm, javaunixsolaris <[email protected]> wrote:
>
>
>
> > I have a BUG that only manifests while in JavaScript, I couldn't
> > recreate it in HostedMode or even -Dgwt.args="-prod" mode (supposed to
> > run javascript right? but I digress).
>
> > So I hit the application with Firebug and walked over the JavaScript.
> > Turns out I have some java.util.Date that are set as typeId$ 181 while
> > others are typeId$ 22, so when you compare the two it throws a class
> > cast exception (throw $ClassCastException(new ClassCastException);)
>
> > I determined type 22 is the correct type for java.util.Date by
> > watching other Date's in the program.  I have a work around but it's
> > kind of messy, this line will change the type from 181 to 22:
> > Date startTime = aReservation.getStartTime();
> > Date newTypeQuestionMark = (Date) startTime.clone();
> > then I can safely compare the two java.util.Date(s):
> > if(newTypeQuestionMark.compareTo(myTimestringStart) < 0)
> > {
> > ...
> > Now in my example startTime does come from an java.util.Date that went
> > over RPC...are types lost when serialized?
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Google Web Toolkit" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group 
> athttp://groups.google.com/group/google-web-toolkit?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to