Hi,
I'm trying to manually add data to a ListGrid with SmartGWT 2.4, and after I load the data the whole client becomes incredibly slow and unresponsive.
What I'm doing is using a GWTRpc service to get back a list of records called HeardReport. Then:
I tried building a RecordList and calling grid.setData() but that didn't help. The documentation there confused me:
1) there is no such constructor ListGrid(ListGridRecord[]) ... perhaps they mean this is what happens INTERNALLY?
2) It's telling me to call setData(ListGridRecord[]) which appears to be directing me to the same thing I'm already reading? See http://www.smartclient.com/smartgwt/...dRecord[]) to see what I mean.
When it becomes unresponsive, so does the debugger and SpeedTracer. The only slight clue I have as to where it's stuck is when I use Firefox, and it tells me: "A script on this page may be busy, or it may have stopped responding. Script: http://localhost:8080/hello/sc/modules?ISC_Grids.js:60"
I'm trying to manually add data to a ListGrid with SmartGWT 2.4, and after I load the data the whole client becomes incredibly slow and unresponsive.
What I'm doing is using a GWTRpc service to get back a list of records called HeardReport. Then:
Code:
@Override public void onSuccess(List<MyObj> reports) { int numRows = reports.size(); for(int i=0; i<numRows; ++i) { Record r = new Record(); MyObj report = reports.get(i); /* copy all fields */ r.setAttribute("platformId", report.getPlatformId()); ... grid.addData(r); }
Code:
setData public void setData(ListGridRecord[] records) A List of ListGridRecord objects, specifying the data to be used to populate the ListGrid. In ListGrids, the data array specifies rows. Note that ListGrids automatically observe changes to the data List and redraw accordingly. This property is settable directly only as part of a ListGrid constructor. If you want to change the ListGrid's data after initial creation, call setData(com.smartgwt.client.widgets.grid.ListGridRecord[]).
2) It's telling me to call setData(ListGridRecord[]) which appears to be directing me to the same thing I'm already reading? See http://www.smartclient.com/smartgwt/...dRecord[]) to see what I mean.
When it becomes unresponsive, so does the debugger and SpeedTracer. The only slight clue I have as to where it's stuck is when I use Firefox, and it tells me: "A script on this page may be busy, or it may have stopped responding. Script: http://localhost:8080/hello/sc/modules?ISC_Grids.js:60"
Comment