Re: How to get list of objects from JSON ??

2010-10-27 Thread Sebastian Beigel
You can very well subclass JSOs [...] What you cannot do is virtual dispatching (i.e. overring methods: methods must be final, but not necessarily classes). Of course you are right -- I wasn't precise (and thus wrong :) What I meant (and hate :) is that you're not allowed to override methods

Re: How to get list of objects from JSON ??

2010-10-27 Thread Thomas Broyer
On 27 oct, 10:24, Sebastian Beigel sebast...@beigel.de wrote: You can very well subclass JSOs [...] What you cannot do is virtual dispatching (i.e. overring methods: methods must be final, but not necessarily classes). Of course you are right -- I wasn't precise (and thus wrong :) What

Re: How to get list of objects from JSON ??

2010-10-26 Thread Santosh kumar
Hi , Moitra and Thomas Thanks for your reply.. !! Anyways i got a solution.. *use this code in the servlet* --- - get the list of products (productList) and use it in the servlet: - This is JSON format to form a array of objects // Open the script tag writer.append(script

Re: How to get list of objects from JSON ??

2010-10-26 Thread Subhrajyoti Moitra
IMHO Overlay types are so much better than this round about solution. WHy cant your servlet just output JSON data instead of some script? What you are doing manually, would have been done automatically if u used Overlay types. Anyways, good you were able to sort this problem out. Thanks,

Re: How to get list of objects from JSON ??

2010-10-26 Thread Jeff Schwartz
If the servlet is returning json then wouldn't just calling eval(jsonString) in your client create the javascript objects? On Tue, Oct 26, 2010 at 9:42 AM, Subhrajyoti Moitra subhrajyo...@gmail.comwrote: IMHO Overlay types are so much better than this round about solution. WHy cant your

Re: How to get list of objects from JSON ??

2010-10-26 Thread Thomas Broyer
On 26 oct, 15:38, Santosh kumar kopp@gmail.com wrote: Hi , Moitra and Thomas Thanks for your reply.. !! Anyways i got a solution.. *use this code in the servlet* --- - get the list of products (productList) and use it in the servlet: - This is JSON format to form a array of

Re: How to get list of objects from JSON ??

2010-10-26 Thread Thomas Broyer
On 26 oct, 16:27, Jeff Schwartz jefftschwa...@gmail.com wrote: If the servlet is returning json then wouldn't just calling eval(jsonString) in your client create the javascript objects? The servlet isn't returning JSON, it's outputting a script to go right in the dynamic HTML host page:

Re: How to get list of objects from JSON ??

2010-10-26 Thread Sebastian Beigel
Hi Thomas, Of course, if your really want Product as a real bean, and a List? instead of a JsArray?, you can copy things around (see below); but really I believe overlay types are much more readable than anything using com.google.gwt.json.* classes. I used to use overlay type heavily

Re: How to get list of objects from JSON ??

2010-10-26 Thread Subhrajyoti Moitra
All this led me to write a Generator which inspects my models (real beans) and emits JSON mapping code handling simple properties, object graphs and collections.= This is very interesting. Can u give some hints as how to go about writing this Generator? Thanks, Subhro. On Tue, Oct 26, 2010 at

Re: How to get list of objects from JSON ??

2010-10-26 Thread Harald Pehl
Feel free to take a look at Piriti (http://code.google.com/p/piriti/). It's a JSON / XML mapper for GWT using annotations and defered binding. Using Piriti you can have real POJOs on the client side. References and inheritance is supported. I'm about to release version 0.6 soon which will add

Re: How to get list of objects from JSON ??

2010-10-26 Thread Subhrajyoti Moitra
Thanks Harald for reminding me. I actually used priti for some xml work. Not JSON. Yes, i think this also is a good alternative. Thanks, Subhro. On Wed, Oct 27, 2010 at 1:48 AM, Harald Pehl harald.p...@googlemail.comwrote: Feel free to take a look at Piriti (http://code.google.com/p/piriti/).

Re: How to get list of objects from JSON ??

2010-10-26 Thread Thomas Broyer
On 26 oct, 18:33, Sebastian Beigel sebast...@beigel.de wrote: Hi Thomas, Of course, if your really want Product as a real bean, and a List? instead of a JsArray?, you can copy things around (see below); but really I believe overlay types are much more readable than anything using

Re: How to get list of objects from JSON ??

2010-10-23 Thread Thomas Broyer
On 23 oct, 07:38, Santosh kumar kopp@gmail.com wrote: Hi, Using Dictionary in Gwt onModule load i want to get the list of objects from Json  ??? http://code.google.com/webtoolkit/articles/dynamic_host_page.html The example in the above link it is shown for string, but i want to get

Re: How to get list of objects from JSON ??

2010-10-23 Thread Subhrajyoti Moitra
http://googlewebtoolkit.blogspot.com/2008/08/getting-to-really-know-gwt-part-2.htm Use overlay types to read JSON arrays and objects. Thanks, Subhro. On Sat, Oct 23, 2010 at 11:08 AM, Santosh kumar kopp@gmail.com wrote: Hi, Using Dictionary in Gwt onModule load i want to get the list of

How to get list of objects from JSON ??

2010-10-22 Thread Santosh kumar
Hi, Using Dictionary in Gwt onModule load i want to get the list of objects from Json ??? http://code.google.com/webtoolkit/articles/dynamic_host_page.html The example in the above link it is shown for string, but i want to get the list of objects form the json ?? And also can you send me the