If you are looking for simple but effective solution to refresh data in ADF, you might be interested to check ADF Poll component. This component integrates well with ADF fragments - reload event is isolated in the scope of fragment and not distributed to entire page, means whole page will not be refreshed, but only fragment. I will demo this below with example.
Sample application with ADF Poll component configured to refresh Employees table only -
ADFPollFragmentApp.zip.
Employees fragment implements ADF table and Poll components:
Poll is set to initiate reload event every 5 seconds by default. It will stop sending reload events after 600000 seconds. PollListener is defined to implement reload logic:
PollListener re-executes VO SQL for the table and at the end sends Partial Trigger event to perform visual refresh for the Panel Collection UI component containing table with Employees data:
VO is re-executed by accessing iterator bindings from Page Definition:
Main page includes ADF region where Poll component is configured and additionally it contains another table component. There is one more table included to prove that data reload event is not distributed outside of the fragment:
We can see how it works. Open Departments tab from the main page, where no Poll component is configured and select any row from the table - remember your selection, we are going to check it later:
Go to the Employees tab and there check current salary value for Lex De Haan employee. Salary value is 17007:
Open database table and change salary value for the same employee to be 1500, commit your changes:
Switch back to page and you will see that during next data reload Poll event - change will be fetched to the UI:
Similar if you create new record and commit it in the database:
This record will appear in the UI automatically for you:
If you go to Departments, previously selected row still remains correct - this means Poll component was distributing reload event only in the scope of the fragment: