Without being able to run the code (as you didn't post the proxy, the server entity, the service proxy (aka request), or the service implementation, its a little hard to say, but I do see at least one thing definitely wrong, and others that may be confusing.
First and foremost, return the same instance from asWidget()
each time it is called. The chain of events I am guessing is occurring that is confounding you:
- App starts, something creates an instance of the widget where this
asWidget
method exists. In the course of setting it up, a store is created, as is a loader, andthis.loader
is assigned to that loader. The widget is added to the dom. - At some point, asWidget() is called a second time. This leaves the old grid attached (from the first time it was called), and creates a new grid, a new store, a new loader (and assigns to
this.loader
), but may not do anything with that new grid - Finally
reload
is called. This has a valid loader (the new one, not the old one), calls the server, populates the new store, which draws in the new grid. However, the old grid is still attached, so data never shows up.
With this fixed, you don't actually need to override any methods in LoadResultListStoreBinding
- the base class will add items to the store, and the store will issue events that the grid is listening for.