I guess serializing objects and storing them in the history could
work. However, there might be a mismatch in the Writer and Reader.
GWT-RPC serialization to the server is a binary pipe delimited format,
while the server returns optimized JSON. The GWT-RPC request looks
something like this (... removes some data):

5|0|4|.../|8689529FF938331E041A0E722074DEF8|...|getCurrentUser|1|2|3|4|0|

While the response look something like this:

//OK[8,7,2,6,1,2,1,2,-1,2,6,5,4,1,3,1,2,1,2,1,[".../446307451","java
.lang.Boolean/476441737","java.util.HashSet/1594477813",".../3836941791"
,"ROLE_ADMIN","java.lang.Integer/3438268394","..."
,"..."],0,5]

So you might have to use your own format if the reader can't read what
the writer makes. Nevertheless, depending on the size of your objects,
the URL could get really messy.

While we don't save the state of the object, we do use History to
indicate "pages". We use a format similar to what Gmail does, i.e.
mail.google.com/mail#label/gwt+group, etc. If we're editing a specific
record, we use something like #edit/customer/425 so we have the unique
id of the customer and just make a GWT-RPC to retrieve the record.

I hope that helps.

Regards,
--
Arthur Kalmenson



On Tue, Apr 21, 2009 at 1:48 PM, Keith <keiths...@gmail.com> wrote:
>
> Do you think is it a bad idea to use SerializationStreamWriter and
> SerializationStreamReader to write an object's state to the history?
> It seems like it would be a more convenient way to go than for me to
> try to write my own methods for doing this. I guess it could be a
> problem if I blow past the URL length limit but I suppose that is a
> possibility with my own serialization schemes too.
>
> Thanks in advance for your advice
> -Keith
>
> >
>

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

Reply via email to