Any action in Zope that causes objects to change can be undone via the Undo tab. You can recover from mistakes by undoing them.
Select the zoo folder that we created earlier and click Delete. The folder disappears. You can get it back by undoing the delete action.
Click the Undo tab, as shown in Figure 2.5.
Figure 2.5 The Undo view.
Select the first transaction labeled /manage_delObjects, and click the Undo tab.
This action tells Zope to undo the last transaction. You can verify that the task has been completed by making sure that the zoo folder has returned.
Undo Details and Gotchas
Undo works on the object database that Zope uses to store all Zope objects. Changes to the object database happen in transactions. You can think of a transaction as any change you make to Zope, such as creating a folder or pasting a bunch of objects to a new place. Each transaction describes all the changes that happen in the course of performing the action.
You cannot undo a transaction that a later transaction depends upon. For example, if you paste an object into a folder and then delete an object in the same folder, you might wonder whether or not you can undo the earlier paste. Both transactions change the same folder so that you can not simply undo the earlier transaction. The solution is to undo both transactions. You can undo more than one transaction at a time by selecting multiple transactions on the Undo tab and then clicking Undo.
Another problem to be aware of is that you cannot undo an undo. Therefore, if you add a folder and then undo that particular action, you cannot get the new folder back by undoing the undo.
One last note on undo. Only changes to objects stored in Zope can be undone. If you have integrated data in a relational database server, such as Oracle or MySQL (as discussed in Chapter 10, "Relational Database Connectivity"), changes to data stored there cannot be undone.