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 OfflineAsyncCallback<T> implements
AsyncCallback<T> {

    private T offlineResult;

    public void onFailure(Throwable caught) {

         //load from localStorage
         offlineResult = deserialize(serializedString);
    }

    public void onSuccess(T result) {

        String serializedString = serialize(result);
        //save to localStorage
    }

    private String serialize(T object) {TODO};
    private T deserialize(String s) {TODO};

}

Is it possible to implement this two functions serialize() and
deserialize() by using GWT internal class? Are there any other
alternatives to cache GWT response?

Thanks for help,
Alex

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

Reply via email to