Hi timmys,
Here an example with the payload embedded in the host page.
Hope it helps,
Berto
public static YourDomainObject getEmbeddedYourDomainObject() {
SerializationStreamFactory serializationStreamFactory =
GWT.create(IYoutRemoteService.class);
try {
String serializedYourDomainObject =
getEmbeddedObject("embeddedYourDomainObject");
if (null != serializedYourDomainObject) {
return (YourDomainObject)
serializationStreamFactory.createStreamReader(serializedYourDomainObject).readObject();
} else {
return null;
}
} catch (SerializationException e) {
throw new IllegalStateException("Error deserializing
embedded object.");
}
}
// Change this to your client-side storage option
private native static String getEmbeddedObject(String name) /*-{
return eval("$wnd." + name);
}-*/;
On Jun 16, 10:32 am, timmys <[email protected]> wrote:
> Hi!
>
> We've build an application that reads quite large objects graphs from
> the server through the rpc mechanism.
> This all works fine. But often these object graphs are identical
> between browser sessions, so I was wondering if I could get the
> underlying rpc payload string, store that using local storage, and
> then reuse that at a later browser session. This would be a real nice
> optimization. I just don't know how to achieve this, especially how to
> hook in to gwt rpc to get the payload and how to deserialize that at a
> later session. Anybody have any good ideas ??
--
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.