Question

I'm using GWT 2.5rc2 request factory with GAE1.7, the server side use entity locator to load entity from datastore.

"Fake" entities means entities that are never stored in datastore, only used for transferring entity objects from server to client and vice versa.

Now i have a fake entity sent from server to client side is OK, but from client side to server side the locator will throw exception because it can not find the ID, if i set a random ID for fake entity, it will give exception: The requested entity is not available on the server

Any ideas on how to solve this problem or any workarounds?

No correct solution

OTHER TIPS

You can use a container ValueProxy and embed EntityProxy objects.
Something like this:

@ProxyFor(AccountPage.class)
public interface AccountPageProxy extends ValueProxy  {
    public List<AccountProxy> getAccounts();
    int getNumber();
    long getTotalElements();
    int getTotalPages();
}

@ProxyFor(...)
public interface AccountProxy extends EntityProxy {

}

For example I use this approach to transfer a Page (start, end) of a list of EntityProxy to the client (see above example).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top