Search code examples
javaajaxgwtgwt-rpc

Open new page, deserialize object in GWT


I need to open new page and pass to this page object. New page will be handled by servlet. Please, tell me, how can pass object to servlet? Note, that this servlet will write content directly to new page.


Solution

  • Standard way of doing this is to issue a RPC request once the page is loaded. If you want to pass these data without additional RPC, you can pre-serialize the data into javascript variable. The most difficult for understanding part is serialization itself but these two articles give quite good insight on this:

    1. http://www.techhui.com/profiles/blogs/simpler-and-speedier-gwt-with
    2. http://wiki.shiftyjelly.com/index.php/GWT