I just posted the whole patched class ... It works great for me:
http://code.google.com/p/google-web-toolkit/issues/detail?id=6319 Romain On Jul 18, 8:25 pm, Jesse Hutton <[email protected]> wrote: > I'm just starting with RF and I hit a snag related to the workflow of > creatingnewentityrecords on the server. If I do something like: > > MyProxy proxy = request.create(MyProxy.class); > myDriver.edit(proxy, request); > > and then in my save click handler: > > request.persist(proxy).fire(newReceiver<Void>() { > ... > > }); > > any constraint violations will be reported to the receiver in > onViolation(). But, they are not reflected in the UI where I'm using > ValueBoxEditorDecorators to wrap my text fields. In > AbstractRequestFactoryEditorDriver$SimpleViolationAdapter, getKey() is > returning null, which is preventing the display in > SimpleViolation#pushViolations(). > > However, if I'm editing a an existingentity, > SimpleViolationAdapter#getKey() returns non-null, and theviolation > message is displayed. I just realized that even if I do: > request.getNew().fire(newReceiver<MyProxy>() { > @Override > public void onSuccess(MyProxy response) { > currentProxy = response; > edit(response); > } > }); > > where my service method just returns anewentityinstance, getKey() > again is non-null and constraintviolationmessages are shown. > > So, that appears to be a fine workaround for the violations display > issue. But, is there a bug there? Or, is there a better workflow than > writing getNew() methods for all your request/service methods for > handling not-yet-persistedentityproxies? > > Jesse -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
