A frequently-asked question is how to restore the end-user's current row in a table or form display on a transaction rollback. Of course, if the user happens to have a new row current when they cause a rollback to occur, that row won't be there any more to return to after the rollback, but in many cases the user might be "sitting" on an existing row and might be surprised or confused if performing a rollback changes the current row back to the first row in the rowset.
I've added example number 68 to my example page with some working code that illustrates how to override the view object's beforeRollback() and afterRollback() methods to accomplish the job. The example is based on JSF and depends on the 10.1.3 release, but the same idea could be implemented in earlier releases of Oracle ADF. The code is implemented in a generic way as an ADF framework extension class for view objects. For more information about framework extension classes, see section 25.1.1 Globally Extending ADF Business Components Functionality in the ADF Developer's Guide.
1:24:44 PM
|