Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Lazy loading problem
Lazy loading problem [message #763150] Fri, 09 December 2011 09:05 Go to next message
Markus Schindler is currently offline Markus SchindlerFriend
Messages: 30
Registered: July 2009

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

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

How can I handle this?
Should I set table.setItemCount only to the value of the elements I already have in memory?

Re: Lazy loading problem [message #764649 is a reply to message #763150] Mon, 12 December 2011 15:36 Go to previous message
Lakshmi ShanmugamFriend
Messages: 275
Registered: July 2009
Location: India
Senior Member

See this useful article on Virtual Tree & Table -->

After an item has been initialized, the SWT.SetData listener is not called to set its data again. But when the item is cleared with Table.clear() the listener will be called to set its data again as necessary.

Lakshmi P Shanmugam
Previous Topic:Not able to paste Ms-Excel column into SWT's Text widget
Next Topic:Eclipse taking breaks under Mac OS 10.7 Lion
Goto Forum:

Current Time: Wed May 23 20:56:56 GMT 2018

Powered by FUDForum. Page generated in 0.01437 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top