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);
}-*/;