Uncaught TypeError: binding.destroy is not a function in ExtJs 5
Uncaught TypeError: binding.destroy is not a function in ExtJs 5
我在 extjs 5.1
中使用 Ext.util.StoreHolder
mixin view.I 发现 Ext.destroy()
方法存在问题,该方法在破坏具有可绑定 mixin 的视图时抛出错误 Ext.util.StoreHolder。我无法破坏那个视图,它给我错误
Uncaught TypeError: binding.destroy is not a function
at Ext.define.privates.removeBindings
我的视图正在使用mixin:
mixins: {
bindable: 'Ext.util.StoreHolder'
},
Ext.util.StoreHolder mixin 有什么问题吗?为什么我不能破坏那个视图?
编辑 -> ,请找到我的代码
Ext.define('MyApp.view.ux.CustomPagingBar', {
extend: 'Ext.toolbar.Toolbar',
alias : 'widget.custompagingbar',
mixins: {
bindable: 'Ext.util.StoreHolder'
}
});
在这里找到 Fiddle Grid with Paging bar destroy issue
确保在视图上调用 destroy 时取消绑定商店。
我认为这应该可行。
Ext.define('MyApp.view.ux.CustomPagingBar' ,{
extend: 'Ext.toolbar.Toolbar',
alias : 'widget.custompagingbar',
mixins: {
bindable: 'Ext.util.StoreHolder'
},
// other code
onDestroy: function(){
var me = this;
me.bindStore(null);
// some other custom code if you want
me.callParent();
}
});
// me.bindStore(null); this will unbind the store from the view before it is destroyed
在 Ext JS 5 中,Ext.mixin.Bindable has a new config--"bind"--
允许在组件上定义绑定描述符。
在我的组件的 "bind" 方法中覆盖了它,因此绑定清理过程试图破坏绑定,但没有正确的配置。
评论 "bind" 方法防止销毁问题。
我在 extjs 5.1
中使用 Ext.util.StoreHolder
mixin view.I 发现 Ext.destroy()
方法存在问题,该方法在破坏具有可绑定 mixin 的视图时抛出错误 Ext.util.StoreHolder。我无法破坏那个视图,它给我错误
Uncaught TypeError: binding.destroy is not a function
at Ext.define.privates.removeBindings
我的视图正在使用mixin:
mixins: {
bindable: 'Ext.util.StoreHolder'
},
Ext.util.StoreHolder mixin 有什么问题吗?为什么我不能破坏那个视图?
编辑 -> ,请找到我的代码
Ext.define('MyApp.view.ux.CustomPagingBar', {
extend: 'Ext.toolbar.Toolbar',
alias : 'widget.custompagingbar',
mixins: {
bindable: 'Ext.util.StoreHolder'
}
});
在这里找到 Fiddle Grid with Paging bar destroy issue
确保在视图上调用 destroy 时取消绑定商店。
我认为这应该可行。
Ext.define('MyApp.view.ux.CustomPagingBar' ,{
extend: 'Ext.toolbar.Toolbar',
alias : 'widget.custompagingbar',
mixins: {
bindable: 'Ext.util.StoreHolder'
},
// other code
onDestroy: function(){
var me = this;
me.bindStore(null);
// some other custom code if you want
me.callParent();
}
});
// me.bindStore(null); this will unbind the store from the view before it is destroyed
在 Ext JS 5 中,Ext.mixin.Bindable has a new config--"bind"--
允许在组件上定义绑定描述符。
在我的组件的 "bind" 方法中覆盖了它,因此绑定清理过程试图破坏绑定,但没有正确的配置。
评论 "bind" 方法防止销毁问题。