ucan-ext-js-kitchen-sink
Version:
my-ext-gen-app description for Ext JS app MyExtGenApp
48 lines (37 loc) • 1.08 kB
JavaScript
Ext.define('UCAN.common.util.components.ChainedTreeStore', {
extend: 'Ext.data.ChainedStore',
alias: 'store.chainedTree',
constructor: function(config) {
config = Ext.apply({
source: Ext.create('Ext.data.TreeStore'),
rootVisible: false,
parentIdProperty: 'parentId'
}, config);
this.callParent([config]);
},
getRoot: function() {
return this.getSource().getRoot();
},
setRoot: function(root) {
this.getSource().setRoot(root);
},
getRootVisible: function() {
return this.getSource().getRootVisible();
},
setRootVisible: function(rootVisible) {
this.getSource().setRootVisible(rootVisible);
},
isLoaded: function() {
return this.getSource().isLoaded();
},
hasPendingLoad: function() {
return this.getSource().hasPendingLoad();
},
onNodeExpand: function(newRoot, childNodes) {
return this.getSource().onNodeExpand(newRoot, childNodes);
},
query: function(property, value, operator) {
return this.getSource().query(property, value, operator);
},
isTreeStore: true
});