I am creating a lot of UIs that contain multiple levels of objects. An example would be for instance a purchase order. A purchase order has information regarding the order itself, but it also contains an unspecified number of line items which in turn contain particular information.
One problem I have with this kind of UI is what should be seen as an atomic action (i.e. an action that should only succeed completely, or fail completely). Saving changes is such an action.
I could see each line item atomic and in a web interface use Ajax technology to save each line item that has been changed as soon as the line has no focus anymore. This would speed up the response time. However, it makes saving each line its own atomic action.
On the other hand, the saving all changes of the whole order could be seen as an atomic actions. This means that the user can change lines and cancel all changes. In this moment, either the whole document is saved, or nothing.
Is there any study about user interfaces, or design principles that can help me with this dilemma?