Thanks for your hints, guys. Here is my solution:
-- OfflineRequestCallback: used to get serialized response and
handle it appropriately.
public class OfflineRequestCallback implements RequestCallback {
// This String we can save in localStorage.
private static String
Hello,
i m working on generalized AsyncCallback class which allows to get a
serialized string from a succesful GWT RPC response, so i can save it
to htlm5 localStorage and use it as cached result in case RPC request
fails.
public abstract class OfflineAsyncCallbackT implements
AsyncCallbackT {
Hello Alex,
Sure you can do that. Have a look at [1], there's a post about how to
do the very same thing with using the HTTP GET cache - so this will
work also with non-html5 speaking browsers. Still that solution faces
the same problem of how to serialize and deserialize the data.
[1]
Unfortunately, RPC serialization is assymetric : On client side,
you'll be able to deserialize data serialized on the server, and
vice-versa.
But you will not be able to serialize/deserialize data on the client.
If you cache data received from the server, you can deserialize it
using the