It is feasible. In my solution I used GWT-RPC's serialization but I had to tweak it since GWT-RPC messages are assymetric (the message sent from the client to the server is in a different format than the message sent from the server to the client even if they transfer the same object). Basically you have to make the serialization symetric. I did this by implementing the streamwriter to output the same message that the serverside would output. I did this basically by porting the server code to the gwt side. I then leveraged the already existing reader in the client and generated (by using generators) a class that returns the desired reader and writer. The reader is of course used to read the string and outputs the object and the writer takes the object and outputs the string. By using this method you can not only save results from RPC calls but any serializable object in the LocalStorage. Since the storage in the LocalStorage is limited a further improvement is to compress the string. For this I use the LZMA algorithm which can compress the strings to about 60% of their original size. Based on my tests, bigger objects compress better but this is based on objects in my project and might not be the case for other kinds of objects.
Hope this helps. Regards, M On Wednesday, October 10, 2012 7:13:20 AM UTC+2, JeanV wrote: > > I was wondering if there's anyway to save the returned results from an RPC > call to an HTML5 enabled browser. Basically the only way I have found would > be to convert the results into strings and use LocalStorage to save them to > the browser. I guess my question then would be how can IsSerializable java > objects be converted to a string and back. > Any help would be appreciated. > > Jean > > -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/wexdvPb0u54J. 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.