Friday, October 28, 2011

Re: GWT + GAE common issues.

1. I don't think so.  They're meant to be used from the server side of GWT.  For exposing server objects you use RequestFactory in combination with ValueProxy
2. I suggest you take a look at the "expenses" sample that comes with GWT.


You can see the Employee object in its server version here:
and its client representation here:

RequestFactory intro here:


3. MVP won't really touch this since it's client side so it only sees proxy types

So if you want to expose an AppEngine key, you would use KeyFactory to convert it to a string for the client and back to a string for the server.  If you want to expose AppEngine's User object, you would use a ValueProxy instead of an EntityProxy, e.g.,

@ProxyForName("com.google.appengine.api.users.User")
public interface UserProxy extends ValueProxy {
  String getNickname();

  String getEmail();
}


--
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/-/Jwbi4juIGvkJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment