Pat,
On 03/23/2010 04:35 AM, Patrick Paskvan wrote:
> Hello List,
>
>>From what I can tell from the documentation and qooxdoo code, qooxdoo
> is simply evaling the json return value of an RPC call. In order to
> pass a date from the server to client and have the client
> automagically turn it into a javascript date object, we should simply
> use "new Date(<date values>)" as the return value.
>
> I'm using the Perl RPC backend and tried doing this by hand, but end
> up with 'null' on the client side. Same result when using the date
> class provided by the Perl backend. Here is a sample of the return
> data when using the date class provided by the Perl backend (calling
> $call_date->toJson() when adding it to the return data):
>
> {"id":2,"result":[{"urgency":"2 days","customer_id":"24","notes":"no
> comment","load_id":"1","call_date":"new
> Date(Date.UTC(2010,2,20,0,0,0,0))","miles":"20","call_time":"14:45"}]}
>
> That "call_date" value ends up as null.
Did I get that right? So the value you receive on the client is
something like this:
{"id":2,"result":[{"urgency":"2 days","customer_id":"24","notes":"no
comment","load_id":"1","call_date": null,
"miles":"20","call_time":"14:45"}]}
right?!
Did you check the return value of $call_date->toJson() on the server?
T.
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel