Problems passing class objects through GWT RPC

后端 未结 8 901
野趣味
野趣味 2020-12-04 18:39

I\'ve run through the Google Web Toolkit StockWatcher Tutorial using Eclipse and the Google Plugin, and I\'m attempting to make some basic changes to it so I can better unde

8条回答
  •  暖寄归人
    2020-12-04 18:41

    There is a far more simple and easy solution for that. If you want to send an object of your custom designed class from server side to client side you should define this custom class in shared package.

    For example for your case the you just have to carry the Stock.java class (by drag and drop) into

    com.google.gwt.sample.stockwatcher.shared

    package. However from your package hierarchy screenshot it seems that you had deleted this shared package. Just re-create this package and drop the Stock.java inside it and let the game begin.

提交回复
热议问题