Thursday, November 1, 2012

Re: How to clear fields of editors?


On Thursday, November 1, 2012 6:10:58 PM UTC+1, Jens wrote:
When you want to edit a new instance (regardless if its an "empty" instance or not) you would create a new editor driver and call edit() with the new instance. As the editor graph represents more or less your object graph this should be enough to update the Ui. If the instance is "empty" the Ui should be "empty" as well after calling edit(). I guess thats why there is no clear() method.

+1 except you don't have to create a new editor driver, you can reuse a previously built one.

If you want a clear(), then add a clear() to the edited object (Account) and edit() it again (or create a new object and edit() it, depending on your needs).

--
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/-/TY5Lmxgbw1gJ.
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