SmartGWT version 3.0
GWT version 2.4.0
OS = Ubuntu11.10 (not tried other OS's bcoz I only have this)
Browser = firefox 7.0.1
Problem description:
I am creating a SGWT RPC application having a UI dialog which has a ListGrid object (among other things). I could successfuly do RPC, fetch and load the data to list grid object. But when I start scrolling it is pathetically slow.
To isolate the problem, I created a bare-bones application with no RPC stuff, but just one single ListGrid with locally populated data (with 100 ListGridRecords). This still has the same behavior.
Am I missing something here? The code is given below:
After running the above code the list grid displays with 100 records. However, the scrolling is painfully slow and unacceptable. Please help.
regards,
RV
GWT version 2.4.0
OS = Ubuntu11.10 (not tried other OS's bcoz I only have this)
Browser = firefox 7.0.1
Problem description:
I am creating a SGWT RPC application having a UI dialog which has a ListGrid object (among other things). I could successfuly do RPC, fetch and load the data to list grid object. But when I start scrolling it is pathetically slow.
To isolate the problem, I created a bare-bones application with no RPC stuff, but just one single ListGrid with locally populated data (with 100 ListGridRecords). This still has the same behavior.
Am I missing something here? The code is given below:
Code:
import java.util.ArrayList;
import com.google.gwt.core.client.EntryPoint;
import com.smartgwt.client.widgets.grid.ListGrid;
import com.smartgwt.client.widgets.grid.ListGridField;
import com.smartgwt.client.widgets.grid.ListGridRecord;
/**
* Entry point classes define <code>onModuleLoad()</code>.
*/
public class RemoteFileBrowser implements EntryPoint {
/**
* This is the entry point method.
*/
public void onModuleLoad() {
ListGrid grid = getListView();
updateListView(grid);
grid.draw();
}
private ListGrid getListView() {
ListGrid fileGrid = new ListGrid();
fileGrid.setWidth(500);
fileGrid.setHeight(400);
fileGrid.setLeft(100);
fileGrid.setTop(100);
ListGridField nameField = new ListGridField("name");
ListGridField sizeField = new ListGridField("size");
ListGridField changedField = new ListGridField("changed");
ListGridField rightsField = new ListGridField("rights");
ListGridField ownerField = new ListGridField("owner");
fileGrid.setFields(nameField, sizeField, ownerField, rightsField, changedField);
return fileGrid;
}
private void updateListView(ListGrid grid) {
// create a RecordList object containing ListGridRecord items
// and associate with the view.
//RecordList list = new RecordList();
ArrayList<ListGridRecord> list = new ArrayList<ListGridRecord>();
for (int i=0; i<100; ++i) {
ListGridRecord record = new ListGridRecord();
record.setAttribute("name", "name" + i);
record.setAttribute("size", "size" + i);
record.setAttribute("changed", "changed" + i);
record.setAttribute("rights", "rights"+i);
record.setAttribute("owner", "owner" + i);
list.add(record);
}
//grid.setData(list);
ListGridRecord[] records = new ListGridRecord[list.size()];
list.toArray(records);
grid.setData(records);
}
}
regards,
RV
Comment