If the table is loaded directly into edit mode using emxTableEdit.jsp, note the following behavior. When a user clicks Done on an editable table page, the custom preprocessing methods are reexecuted because the page is refreshed. As a result, if a post processing method has been defined for the table page that unreserves an object (or objects), the re-execution of the preprocessing method will most likely reserve the object(s) again. For customizations that reserve objects in the preprocessing JPO, use a Cancel processing method to unreserve objects instead of a Post processing method. The following examples show how to invoke the emxTable.jsp with postProcessURL:
If both a postProcessURL and postProcessJPO are specified, the postProcessURL executes first, followed by the postProcessJPO. When the standard edit process completes, the edit display frame tableEditDisplay is submitted to a hidden target frame with the post process URL. The post process JSP has the following input parameters available for post processing:
To update or interact with any objects, obtain the context from the request using this code: context = (matrix.db.Context)request.getAttribute("context"); The code sample in Preprocess URL for an Editable Table shows you how to read values from the requestMap and iterate through the ObjectList for the objectIds. If you want the post process JSP or JPO to roll back the transaction based on certain error conditions, then it has to raise an exception. The configurable table component catches the exception and rolls back the entire edit and post processing transaction. |