Lazy loading problem [message #763150] |
Fri, 09 December 2011 09:05 |
Markus Schindler Messages: 30 Registered: July 2009 |
Member |
|
|
Hi,
following problem is given:
I want to show a table with X rows. I know X, but I have already only Y object from X objects in memory.
For example, I know my table should show 10000 rows, but I have only 100 of them in memory, because the came via a webservice very slow.
So, if I use a Table or TableViewer with SWT.VIRTUAL, I can say
table.setItemCount(10000);
So if I scroll to a position in the table, where the data is not already in memory, i can set the text to "loading...".
But the ILazyContentProvider updateElement(int index) method, is only called once, so if the data is loaded, the method to update the cells, is never
called.
How can I handle this?
Should I set table.setItemCount only to the value of the elements I already have in memory?
Regards,
Markus
|
|
|
|
Powered by
FUDForum. Page generated in 0.02516 seconds