On Monday, March 26, 2012 4:22:27 PM UTC+2, Thomas Broyer wrote:
--
On Monday, March 26, 2012 4:18:19 PM UTC+2, Alexander Orlov wrote:On Monday, March 26, 2012 1:49:59 PM UTC+2, Thomas Broyer wrote:The private field storing the LeafValueEditor's values is only initialized in edit(), so in your case you have to call edit() again from your onSuccess.Thx, for the clarification in respect to isDirty(). In fact isDirty() become clean after I've called edit() again. But my actual problem was that the modifications I've made were also not been persisted. I've found a way to persist them doing something likefinal EmployeeReqCtx reqCtxDriver = (EmployeeReqCtx) cf.getDriver().flush();reqCtxDriver.put(employee).fire(new Receiver<Void>() { // persists the edited employee}instead offinal RequestContext reqCtxDriver = cf.getDriver().flush();reqCtxDriver.fire(new Receiver<Void>() {// ... doesn't work at all for editing entities(?) although it's mentioned in the Editor example}It's works very well... provided you previously queued a call to your put() method in the RequestContext !The example does this just before calling edit() on the EditorDriver.in save(). Although I can't imagine that one needs explicit casting to edit an entity..., it works.
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/-/YRhJfe5WNG0J.
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