This has been "solved".
Seems like the grid needs to be instantiated before the call to
store.load()
And even if it has, calling member methods on grid in the context of a
StoreListener breaks with a null reference.
On Dec 1, 6:46 pm, rvsjoen <[EMAIL PROTECTED]> wrote:
> Im trying to understand why this doesnt work, the grid does not get
> populated with data. I also tried calling buildGrid in the
> StoreListenerAdapter::onLoad method. Any help would be appreciated.
>
> private void getData(String url) {
> HttpProxy dataProxy = new HttpProxy(url);
> JsonReader reader = new JsonReader(recordDef);
> reader.setRoot("data");
> reader.setTotalProperty("total");
> store = new Store(dataProxy, reader, true);
> store.load();
> buildGrid();
> }
>
> private void buildGrid(){
> columnModel = new ColumnModel(columns);
> grid = new GridPanel();
> grid.setTitle("Title");
> grid.setColumnModel(columnModel);
> grid.setLayout(new FitLayout());
> grid.setStripeRows(true);
> grid.setStore(store);
> add(grid);
> }
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"GWT-Ext Developer Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/gwt-ext?hl=en
-~----------~----~----~----~------~----~------~--~---