When extending the ATG Commerce form handlers, keep the following important guidelines and concepts in mind:
A form handler subclass that you create should extend a subclass of
PurchaseProcessFormHandler
(orPurchaseProcessFormHandler
directly).If you write any new code that modifies the
Order
object, make sure the code synchronizes on theOrder
object before it is modified.Because many form handler methods already synchronize on the
Order
, you should examine the source code at<ATG2007.3dir>\DCS\src\Java\atg\commerce\order\purchase
to determine whether your new code must do so.The handleXXX methods of the ATG 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 thehandleAddItemToOrder
method. Before any computation is done, thehandleAddItemToOrder
method invokes thepreAddItemToOrder
method. Additionally, after all computation is complete but before returning any information, thehandleAddItemToOrder
method invokes thepostAddItemToOrder
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.