GWT RPC and persistent Java objects

Primarily,

many thanks to Craig for the excellent answer below which I found very useful in finding my original problem ... ref: Problem using GWT Simple RPC: code included

Based on this decision, how can I overcome it (apparently the GWT limitation), where if I leave my permanent object in the / shared folder , as Craig suggests ... and the annotation is like GWT hints ...

@PersistenceCapable
public class Employee {

@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
private Key key;

It seems that GWT is not dealing with / import com.google.appengine.datastore.key on the client side?

I saw some ugly hacks ... but nothing elegant.

Any suggestions are welcome, thanks

+3
4

, App Engine Key ( ) GWT. , , GWT- POJO GWT-RPC .

objectify App Engine. , , , GWT, GWT-RPC .

+3

Key GWT-, jar:

http://www.resmarksystems.com/code/

  • AppEngine-Utils--1.0.jar
  • AppEngine-Utils- 1.0.jar

GWT GWT Key AppEngine. (, Text, Blob User).

:

  • appengine-utils-client-1.0.jar .
  • appengine-utils-server-1.0.jar WEB-INF/lib.

GWT :

<inherits name="com.resmarksystems.AppEngineDataTypes"/>
+2

If you don't need a Key object for something, your key can be long or string, which can be easily serialized and therefore works with the standard GWT-RPC.

data warehouse keys

0
source

I think Google just released the GWT library called requestfactory for this use case. This is a link

0
source

Source: https://habr.com/ru/post/1768505/


All Articles