Save only selected Rows
Hi,
I have a detail (Master - Detail related) table and the rows of this table are populated programmatically. The scenario is that , user can select multiple rows and save them and the rest of the rows should be in UI in cache and not to be deleted. All the rows are displayed in the UI , eventhough it is not saved in the VO.
Programmatically inserting the row will insert the record in the rowset. getSelectRowKeys() - gets the selected row keys. How will I save only the selected rows by leaving the unselected rows in cache for the display?
a I can get the entire rowset iterator and check whether the rowkey exists in the selectedRowKeys List . If not , removeandretain method can be used for that row. But if there are 50 rows and only 2 rows are selected, I end up comparing 50 rows and remove them .
I think I cannot override rowQualifies() - because this runs before inserting the row to the rowset. Correct me if I am wrong.
Is there a way that I can safely save only the selected rows by not removing the other rows ?
To quickly relate the Example for this could be,
Enter the details of the librarary ( master)
at runtime display the lists of books available in that library ( create the rows programmatically ).
User can select certain books and click on save . Only selected books are saved, but still the rest of the books are visible in UI.
Thanks & Regards,
Priya.R