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 (188.8.131.52.0).
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:
In this example, user changes phone number to 123451, then just navigates to another row without saving, and changes will be saved automatically.
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:
And the util methods to evaluate and invoke default selection listener, to make selected row as current row:
we can check database to confirm changes are saved.