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!

Empty List at Page Load

918256Jun 15 2012 — edited Jun 15 2012
Hi, 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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 13 2012
Added on Jun 15 2012
1 comment
167 views