Re: RequestFactory persist new object and return the id
I didn' recognize that I've got a private reply on this. So here is the solution... if you define your persist method with public Employee persist() { } and return the new persisted employee object you can modify your requestFactory interface with InstanceRequest persist(); instead of InstanceRequest persist(); This way you retrieve the newly persisted object through the requestfactory. On 5 Jan., 08:37, Daghan wrote: > The documentation says you have to use stableID with is a new Interface they > have defined on the client side > They claim that the stableID on the proxy is the same before and after the > object is persisted to the database > > Note: I am in the process of implementing this but I am not done yet -- 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-tool...@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.
Re: RequestFactory persist new object and return the id
The documentation says you have to use stableID with is a new Interface they have defined on the client side They claim that the stableID on the proxy is the same before and after the object is persisted to the database Note: I am in the process of implementing this but I am not done yet -- 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-tool...@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.
RequestFactory persist new object and return the id
Hi, is there a simple way to get the objects id after calling the persist method? EmployeeProxy employee = ...request.create(EmployeeProxy.class); ...request.persist().using(employee); ...persistRequest.fire(...) { onSuccess(Void response) { // can i somehow get the id from the server-object? } } I've tried altering the persist method to "public String persist()" instead of "public void persist()" but the requestFactory won't play along. Is there a good way to implement that without making a static persist method? -- 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-tool...@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.