0
votes

I have a bean that has a List<Person> people property. This holds custom POJO objects Person that are populated from a notes view.

The list is then surface in an xpage using a custom repeat control

I have tested this with a hundred or so records and performance is fine, but when testing with larger datasets > 10000 records, performance drops.

I have an idea that I can lazy load the people by only loading the first page (say 30 records) bean.loadData(0, 30) and then load the next set, when the user uses the pager associated with the repeat control.

How do I intercept the pager click to call the loadData(startRow, endRow) method? Or is there another approach I should/could use that still makes use of the bean.

1

1 Answers

1
votes

There is at least one way I know to do that, but unfortunately it requires a bit of work. I have created a complete DataSource of my own. If a DataSource's Model class extends TabularDataModel, it works seamlessly with the Pager control. IBM's DominoViewDataModel class works that way.

The complete procedure is a bit long, but was explained in this (highly interesting) LotusSphere 2011 session: http://www.slideshare.net/NotesSensei/show107-the-datasource-session-take-xpages-data-boldly-where-no-xpages-data-has-been-taken-before