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!

Duplicate rows in ViewObject

973564Oct 2 2015 — edited Oct 14 2015

I have the Entity backed view object which gets the data loaded from a CSV file. For some of the  rows, I have to update the values. I use the following code to update the attribute. Once in a while I see that this generated duplicate rows in the view. It shows the original rows without the update and same set of duplicate rows with the updated values? Any ides how to stop this from happening?

RowSetIterator rs = viewObject.createRowSetIterator(null);

        rs.reset();

         while(rs.hasNext()){

            Row r = rs.next();

            r.setAttribute(attributeName, attributeValue);

            System.out.println("SETTING ATTRIBUTE - " +attributeName+"="+attributeValue);

        }

        rs.closeRowSetIterator();

viewObject.clearCache();

   AdfFacesContext adfFacesContext = AdfFacesContext.getCurrentInstance();
    adfFacesContext.addPartialTarget(stagingTable.getParent()); 
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 11 2015
Added on Oct 2 2015
9 comments
1,518 views