Is there a way by listening to the right events that you can get a store to reload and modify a view before it has been rendered to the screen, but after it has been added to the viewport? Currently, I have the following which will give me fresh data, but because the view as already been rendered, its height is not correct and will not scroll:
PHP Code:
show: function () {
console.log('Checklists view activated.');
Ext.getStore('Checklists').load(function(records, operation, success) {
console.log('Reloaded checklist items...');
this.renderChecklists(); // This line programmatically adds new elements to the view
}, this);
}
Ideally, I'd like to try and get things to work as follows, but there may be a better way to do this, which I'm all open to. (Note that I'm not using a DataView bound to a store to do any of this.)- Checklist view gets requested to be shown via a Viewport.add()
- Either the checklist controller or the checklist view catches that it is about to be shown
- The store for checklists gets reloaded with fresh data
- New elements are created programmatically for items in the checklists store
- These new elements are added to the view
- The view is shown to the user.
What's the best/right way to go about something like this? Thanks in advance all.