Here's the scenario:
- TileGrid populated with GwtRpcDataSource derived DS, setAutoFetchData(true);
- data shows nicely on the grid when the grid is rendered;
- I want to pull a new set of data:
Step 1: ds.fetchData(); // i see the RPC call returned TileRecord[] has the right size and data but no visual change;
Step 2: tileGrid.setData(tileRecords); // throws error: Cannot change configuration propperty 'data' to [Lcom.smartgwt.client.widgets.tile.TileRecord;@1214c59 after the component has been created.
I've tried various combinations as: grid.redraw(), response.setInvalidateCache(true) in the fetch operation but nothing works.
Note that in the DS the data is set via setAttribute("data", recArray) but i don't think this is a prob as initially the grid shows the data fine:
public void onSuccess(List<AssetInfo> result) {
response.setAttribute ("data", toTileRecords(result));
processResponse(requestId, response);
}
Also I i don't use setAutoFetchData(true) I can't put anything into the tile grid later.
Any suggestions, please? Thanks.
- TileGrid populated with GwtRpcDataSource derived DS, setAutoFetchData(true);
- data shows nicely on the grid when the grid is rendered;
- I want to pull a new set of data:
Step 1: ds.fetchData(); // i see the RPC call returned TileRecord[] has the right size and data but no visual change;
Step 2: tileGrid.setData(tileRecords); // throws error: Cannot change configuration propperty 'data' to [Lcom.smartgwt.client.widgets.tile.TileRecord;@1214c59 after the component has been created.
I've tried various combinations as: grid.redraw(), response.setInvalidateCache(true) in the fetch operation but nothing works.
Note that in the DS the data is set via setAttribute("data", recArray) but i don't think this is a prob as initially the grid shows the data fine:
public void onSuccess(List<AssetInfo> result) {
response.setAttribute ("data", toTileRecords(result));
processResponse(requestId, response);
}
Also I i don't use setAutoFetchData(true) I can't put anything into the tile grid later.
Any suggestions, please? Thanks.
Comment