-
14 Mar 2012 6:22 AM #1
[4.1.0-B3] Ext.AbstractView no longer binds its store to load mask
[4.1.0-B3] Ext.AbstractView no longer binds its store to load mask
Looks like along the way to 4.1.0 some code pieces from 4.0.7 were lost.
For example Ext.view.AbstractView no longer performs binding of its store to its load mask.
Relevant part of code from 4.0.7 codebase (highlighted):
Same method in the 4.1.0-B3:Code:bindStore : function(store, initial) { var me = this, maskStore; if (!initial && me.store) { if (store !== me.store && me.store.autoDestroy) { me.store.destroyStore(); } else { me.mun(me.store, { scope: me, datachanged: me.onDataChanged, add: me.onAdd, remove: me.onRemove, update: me.onUpdate, clear: me.refresh }); } if (!store) { // Ensure we have an instantiated LoadMask before we unbind it. if (me.loadMask && me.loadMask.bindStore) { me.loadMask.bindStore(null); } me.store = null; } } if (store) { store = Ext.data.StoreManager.lookup(store); me.mon(store, { scope: me, datachanged: me.onDataChanged, add: me.onAdd, remove: me.onRemove, update: me.onUpdate, clear: me.refresh }); // Ensure we have an instantiated LoadMask before we bind it. if (me.loadMask && me.loadMask.bindStore) { // View's store is a NodeStore, use owning TreePanel's Store if (Ext.Array.contains(store.alias, 'store.node')) { maskStore = this.ownerCt.store; } else { maskStore = store; } me.loadMask.bindStore(maskStore); } } ..... },
As the result load mask never knows that store its bounded to is loading.Code:bindStore : function(store, initial) { var me = this; me.mixins.bindable.bindStore.apply(me, arguments); // Bind the store to our selection model me.getSelectionModel().bindStore(me.store); // 4.1.0: Always refresh regardless of record count. // Template may contain boilerplate HTML outside of record iteration loop. // Also, emptyText is appended by the refresh method. // We call refresh on a defer if this is the initial call, and we are configured to defer the initial refresh. if (store) { if (initial && me.deferInitialRefresh) { Ext.Function.defer(function () { if (!me.isDestroyed) { me.refresh(true); } }, 1); } else { me.refresh(true); } } },
-
15 Mar 2012 12:04 PM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 34,120
- Vote Rating
- 453
Thanks for the report.
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
Wait! Looks like we don't have enough information to add this to bug database. Please follow this template bug format.


Reply With Quote