1. Create ADF BC components and setup the AM Datamodel for master detail. From the data control panel drop the detail as Master Form and Detail Table.
2.
Drop the Preferred Flas as a Single Selection
Column, Boolean Checkbox on the detail table. Choose the selected and
unselected values for the checkbox.
3.
Edit the properties of the Checkbox, add auto
submit to true and set partial trigger on the detail table to the checkbox. Add
a value change listener and bind it to a bean proeperty.
4.
Add logic in value change listener to update all
other rows when a new default row is selected.
5.
Run the application and select a new default
row, you can observe that the other default row already selected is cleared.
You can download the complete application here.
You can change code (step 4):
ReplyDeleteif (newVal!=null && newVal instanceof Boolean && (Boolean)newVal)
to
if (Boolean.TRUE.equals(newVal))
it'll do the same :)