how can i use row set iterator to create multiple dummy detail rows upfront
Hello i am new to ADF and jdeveloper and have a Forms 9i/PLSQL background.
I have a 1 to many master to detail view link and 2 vo's one for each of the master and detail table.
I am trying unsuccsessfully to create 7 unique detail rows up front to populate at a later stage.
I have created a master record with primary key being staff number and week ending date.
i then use code below to try and create 7 detail records - P.S i have trimmed it to the first 2 for demonstration.
I am using
RowSetIterator rsi = this.mydetailVO.getRowSetIterator();
Row newRow1=rsi.createRow();
newRow1.setAttribute("Staff Num","123456A");
newRow1.setAttribute("Week_Ending_Date", "2010-01-01");
newRow1.setAttribute("Claim_Date", "2010-01-01");
newRow1.setAttribute("Day", "Sun");
rsi.insertRow(newRow1);
Row newRow2=rsi.createRow();
newRow2.setAttribute("Staff Num","123456A");
newRow2.setAttribute("Week_Ending_Date", "2010-01-01");
newRow2.setAttribute("Claim_Date", "2010-01-02");
newRow2.setAttribute("Day", "Sat");
rsi.insertRow(newRow2);
However it does create two rows but it always writes over the first row with the details of the second row so they are not unique.
How can i get a new unique row inserted with different details to the firat and how then do i access it uniquely.
Thanks