Empty List at Page Load
918256Jun 15 2012 — edited Jun 15 2012Hi, I want to know if its possible to have an empty VO initialy and only get its information when needed?
I'm using my own override of the excuteQuery method of the View Object that consists in:
public void getFilteredRows() {
this.reset();
Row ActualRow = this.first();
List<Row> Selected = new ArrayList();
while(ActualRow != null){
if(((Number)ActualRow.getAttribute("Id")).toString.equals("1")){
Selected.add(ActualRow);
}
if(!this.hasNext()) break;
ActualRow = next();
}
this.executeEmptyRowSet();
for(Row r: Selected)
insertRow(r);
}
@Override
public void executeQuery() {
super.executeQuery();
getFilteredFoders();
}
it works, it gets called everytime, but initially, all the rows are in the collection? why?
is there any way of forcing it to filter at start? or to not do the method at start?
thanks