When ever you are working with View Object Instances and your use case demands for iterating thru the rows using programmatic iteration,The recommended way for this is to create a second rowset iterator and not to use the one which is bound to the UI.
Code Snippet Illustrating the same
public void doSomething() {
ViewObject vo = getViewObject1();
RowSetIterator iter = vo.createRowSetIterator(null);
while(iter.hasNext()) {
Row row = iter.next();
//your custom code
}
}
WHY???
Code Snippet Illustrating the same
public void doSomething() {
ViewObject vo = getViewObject1();
RowSetIterator iter = vo.createRowSetIterator(null);
while(iter.hasNext()) {
Row row = iter.next();
//your custom code
}
}
WHY???
Cause:
1. The iterator bindings determine what row the end-user sees as the current row in the row set. If your own programmatic logic iterates through the row set using the same default row set iterator that the iterator binding uses, you may inadvertently change the current row the user has selected, leaving the user confused.
No comments:
Post a Comment