Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

delete a row in and ADF table

985680Feb 7 2013 — edited Feb 7 2013
Hi all, I am using jdeveloper 11.1.2.3.0

I am trying to delete rows from a table. I am selecting the rows by a check box. the rowselection property is multiple and I created a transient attribute.
the method that handles the delete is ino the VO java class. My problem is when I select more than 1 row the process does not succeed. But when I select 1 row the process succeed. Also , sometimes I got this error : JBO-27102: Attempt to access dead view row of persistent id 6

the method is :
    public void deleteSelectedRows(){
       
        RowSet duplicateRowSet = this.createRowSet("duplicateRowSet");
        duplicateRowSet.first();
        Row currentRow = this.getCurrentRow();
        boolean currentRowDeleted = false;
     
   Row[] rowsToDelete = duplicateRowSet.getFilteredRows("MarkedForDelete", true);
    
    if (rowsToDelete.length>0) {

            for (Row rw : rowsToDelete) {
               
                if (rw.getKey().equals(currentRow.getKey())) {
                    currentRowDeleted = true;
                }
               
                rw.remove();
            }
          
            this.executeQuery();
           
            if (!currentRowDeleted) {
                this.setCurrentRow(currentRow);
            }
            duplicateRowSet.closeRowSet();
        }
    }
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 7 2013
Added on Feb 7 2013
6 comments
1,826 views