[Xsltforms-support] Dialog OK vs. cancel
Brought to you by:
alain-couthures
From: Micah D. <Mic...@ma...> - 2010-02-02 21:17:56
|
Now that we have dialogs (thanks Alain!) we are looking in to ways to make them work with two possible close cases, OK and Cancel (equivalently, the X button in the upper-right). What do people think of this technique? 1) Create a separate instance called "undo". Upon opening the dialog, copy over the main instance data into "undo". If the user dismisses the dialog with OK, proceed as usual. If the user hits cancel or X, copy the stored instance back over the first one, thus rolling back whatever changes had been made in the dialog. If you have nested dialogs, you'd need to be more careful. Is there a better/more straightforward way to accomplish this? -m |