You can use a Locator with a ValueProxy, it's just that only the create() method will ever be called (so all other methods: find(), getId(), getVersion(), etc. should probably throw an UnsupportedOperationException). If your server-side class has a zero-arg constructor, then you don't need a Locator: being proxied by a ValueProxy, the requirements are different that from EntityProxy-s: no need for a static findXxx method, or getId or getVersion instance methods.
Apart from that, it works just like EntityProxy-s.
You can also see ValueProxy-s like the objects you'd transfer using GWT-RPC: when you send an object from client to server, or from server to client, you're making a "copy", created from scratch (with EntityProxy on the other hand, the "base object" could be retrieved from your database before being modified; with ValueProxy, a new instance is created each time).
If you're moving from GWT-RPC, I'd start using ValueProxy so your methods calls have the same semantics as with GWT-RPC, then move to EntityProxy if you want/need it.--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/H07hfJWEZbEJ.
To post to this group, send email to firstname.lastname@example.org.
To unsubscribe from this group, send email to email@example.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Post a Comment