I don't think this will work, nor do I think it should. As far as I understand it, when you send a proxy reference via a Request, the RF framework attempts to find the server-side entity the proxy is referencing (using the ID), and then calls the associated method in your service implementation passing the server-side entity to the requested method. Since your object does not exist on the server if looked up by ID, the call should fail.
If you want this to work, you need to actually persist the object in createByBarId. Why do you want to do this? I've wanted to do it in order to get default values set on the client-side proxy, but not have the object persisted. Unfortunately that's not possible. Ryan On Jul 25, 11:05 am, Jakob Mar <jakob.runars...@gmail.com> wrote: > Using RequestFacory I am trying to create an object on the server like this: > > public imterface FooRequestContext extends RequestContext > { > Request<FooProxy> createByBarId(String barId);//create new Foo object > (dose not persist it) > Request<FooProxy> calculate(FooProxy foo); > > } > > createByBarId works fine but when I call calculate I get: Server Error: The > requested entity is not available on the server. > > I think I understand the reason for this error. But is there any way to tell > RequestFactory that this object has not been persisted jet and force it to > send the whole object, not just the diff? Just as if it had been created > using requestContext.create(FooProxy.class) . -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.