Filtering Modified Rows in ADF View Object

Some times we need to identify modified or new rows programmatically and determine row status, to be more clear for users.

2

I have developed this sample application –FilterModifiedRows.zip.

in ADF (12.2.1.2.0).

Initially we need to customize default selection in table to get selected row key and add it in java Map if it is not already existed.

Note that keys stored in Map with null values:

3

And also customize default creation action to create new row and get selected row key and add it in SelectedRows Map if it is not already existed:

4

Then, We need to check status for each row in view object to identify whether status is New or Modified. by invoking checkRows method which iterate over selectedRows Map elements and update elements values and increment counters:

5

We have to customize Commit, Rollback actions to commit or rollback changes and reset selectedRows Map and counters:

6

7

Remember to remove SelectedRowKeys property from table.

Finally we can write following expression in inline style of column of table, so that it can check all rows in table and differentiate between different status:

8

You can see  rows are highlighted by orange color after modifying, and highlighted by blue color after create new row. This informs user that he did changes in the table.

1

Author: Ahmed Abul Khair

Senior Oracle ADF Consultant / Technical Lead

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s