User always wants to be informed about changes he did, this means we should keep him informed - moreover with ADF 11g it can be done very easily. Let's say user is changing one row and moving to another, how he will remember what rows were changed and review them once again before submitting to database. Logical answer - by highlighting changed rows. I will describe this use case and will provide sample application.
Download my sample - RowHighlight.zip. You can run this sample on your machine and see that row color will be changed after you will leave edited row and move to the next one.
I'm editing FI_MGR row:
Next I'm changing data for AC_ACCOUNT row, without committing previously done changes for FI_MGR:
You can see - FI_MGR row is highlighted, this informs user that he did changes in that row and those changes will be submitted to database when he will press Save button.
I navigate to the next record - AC_ACCOUNT row becomes highlighted:
After pressing Save button, all user changes are submitted to database and row highlighting is removed:
Now I will tell you, how you can implement described use case. Check my sample application, you will see there in Page Definition file, that I have defined getRowStatusColor method:
This method is calling custom method available in View Object Implementation class - to check current row status. I will need to iterate through range set of rendered rows, this means I will provide method parameter dynamically:
I'm calling this method from Backing Bean class, where I'm evaluating current row status and returning color setting for InlineStyle property of ADF column component:
This means I will highlight each cell individually.
Method in Backing Bean class is accessing rendered row, passing it to getRowStatusColor method and returning red color in case if rendered row is Modified: