简体   繁体   English

打开新页面,在GWT中反序列化对象

[英]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. 新页面将由servlet处理。 Please, tell me, how can pass object to servlet? 请告诉我,如何将对象传递给servlet? Note, that this servlet will write content directly to new page. 注意,该servlet将内容直接写入新页面。

Standard way of doing this is to issue a RPC request once the page is loaded. 执行此操作的标准方法是在页面加载后发出RPC请求。 If you want to pass these data without additional RPC, you can pre-serialize the data into javascript variable. 如果要在不使用其他RPC的情况下传递这些数据,则可以将数据预序列化为javascript变量。 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 http://www.techhui.com/profiles/blogs/simpler-and-speedier-gwt-with
  2. http://wiki.shiftyjelly.com/index.php/GWT http://wiki.shiftyjelly.com/index.php/GWT

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM