If you write a form handler that modifies the Order object, you should implement the transaction-handling pattern described above. The easiest way to do this is to extend either PurchaseProcessFormHandler or a subclass of PurchaseProcessFormHandler. Your form handler will then inherit the beforeSet and afterSet methods, so you won’t need to replicate their portion of the transaction logic. However, any new handler methods you write will need to implement the transaction logic described in the Handler Methods section.

Note that the handleXXX methods of the Oracle ATG Web Commerce form handlers invoke preXXX and postXXX methods before and after any computation is performed. For example, when a customer adds an item to their shopping cart using CartModifierFormHandler, the submit button on the form submits to the handleAddItemToOrder method. Before any computation is done, the handleAddItemToOrder method invokes the preAddItemToOrder method. Additionally, after all computation is complete but before returning any information, the handleAddItemToOrder method invokes the postAddItemToOrder method.

By default these preXXX and postXXX methods have no functionality. They are provided so you can easily extend the form handlers to support additional functionality. However, be aware that these methods do not take any input parameters.


Copyright © 1997, 2012 Oracle and/or its affiliates. All rights reserved. Legal Notices