Revert (Undo) implementation in GWT

空扰寡人 提交于 2019-12-04 13:03:29

So you have "Save" and "Cancel" buttons in your form?

I would recommend you to change the concept. Update your object properties immediately as user edit them (as in GMail, JIRA and many other modern applications) in an OnChange event handler.

Save all updates to the session stack as UpdateAction objects and let the user undo every single property modification calling UpdateAction.undo() method.

The benefits are:

  1. this design is much more user friendly than "Click "Edit" - update - click "Save"" scenario.

  2. You don't need separate view/edit forms/popup dialogs - just a single form for both viewing and editing.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!