el = config.container;
}
var items = [];
- if (this.items) {
- items = this.items;
- this.items = [];
+ if (config.items) {
+ items = config.items;
+ config.items = [];
}
Roo.PagingToolbar.superclass.constructor.call(this, el, null, config);
this.bind(ds);
// supprot items array.
- var _this = this;
+
Roo.each(items, function(e) {
- _this.add(Roo.factory(e));
- });
+ this.add(Roo.factory(e));
+ },this);
};