Update Data in Auto Commit ADF Table

Some times we need to save changes automatically, to avoid any corruption or connection down, so we need to implement auto saving.

I have developed sample application –AutoCommitTable.zip.

in ADF (12.2.1.2.0).

1

We need to check status of transaction, initially the transaction is not dirty (data is not changed). then if user changes any data the status is modified to “Modified”.

States are set to one of these values:

STATUS_INITIALIZED, STATUS_NEW, STATUS_MODIFIED, STATUS_DELETED and STATUS_DEAD.

In this example, user changes phone number to 123451, then just navigates to another row without saving, and changes will be saved automatically.

2
I will describe how it is implemented, You need to customize default behavior of Selection Listener for the table, You can determine unsaved changes with check if the data control transaction is Dirty, then invoke Commit operation:

4

And the util methods to evaluate and invoke default selection listener, to make selected row as current row:

5

6

we can check database to confirm changes are saved.

3