Package com.oaframework.toolkit.common.webui
Extends oracle.apps.fnd.framework.webui.OAControllerImpl
This class provides functionality in two key areas:
See the Example for an example of how to use the Transaction Helper methods.
Cover for the standard processRequest() method. This version will ensure that the Session Date is set for [DateTrack] applications
Cover for the standard processFormRequest() method. Currently add no extra functionality.
Returns the current Application Module, cast to a TkOAApplicationModuleImpl
Three overloaded methods that set the supplied date as the Session Date.
Sets the supplied {{JboDomain|Date}} as the AM Session Date and the Database Session Date (in FND_SESSIONS).
Converts the String Date (format dd-mm-YYYY) to a Date then sets the Session Dates as above.
Gets the Session Date from the Transaction Value, or Database SYSDATE if the Transaction Value is not defined. Then sets the Sessions Dates as above.
Sets the Sessions Dates to Database SYSDATE, as above.
Cover onto TransactionUnitHelper.startTransactionUnit()
Cover onto TransactionUnitHelper.endTransactionUnit()
Cover onto TransactionUnitHelper.isTransactionUnitInProgress()
Calls isTransactionInProgress() to see if the named transaction is in progress. If it is, a further check is made to determine whether the Browser Back was used. If it was a "Navigation Error" exception is raised; otherwise a "Failover State Loss Error" exception is raised.
The TransactionHelper methods are useful when you have a number of different screens in your system, some for displaying data, others for maintaining that data. For this example, suppose we have one Page that lists all the values from a given table (ListRecordsPG), displayed using an AdvancedTable region. Our other Page is for creating or updating a single record from that same table (MaintainRecordsPG), displayed using a MessageComponentLayout. However, for this example we will just concentrate on the creation of records.
The Controller for ListRecordsPG (ListRecordsCO) handles an User Interface event that corresponds to the User having clicked on the "Create" button. Before navigating to the MaintainRecordsPG, the startTransaction() method is called, passing in a suitable name for the transaction, eg: CREATE_RECORD. It is recommended that the constants for the Transaction Names are held in a common constants class.
In the Controller for the maintenance Page (MaintainRecordsCO) the processRequest() method will need to call checkTransaction() with the same constant to check whether the Transaction is in process. Likewise, the processFormRequest() method will need to end the transaction by calling endTransaction() when the user navigates back to ListRecordPG, either by saving or cancelling the edits.