*/
Roo.View = function(config, depreciated_tpl, depreciated_config){
+ this.parent = false;
+
if (typeof(depreciated_tpl) == 'undefined') {
// new way.. - universal constructor.
Roo.apply(this, config);
this.tpl.compile();
- this.tickItems = [];
-
-
/** @private */
this.addEvents({
/**
if(this.tickable){
Roo.apply(d, {'roo-id' : Roo.id()});
- }
+
+ var _this = this;
- Roo.log(data);
- Roo.log(this.tickItems.indexOf(data));
+ Roo.each(this.parent.item, function(item){
+ if(item[_this.parent.valueField] != data[_this.parent.valueField]){
+ return;
+ }
+ Roo.apply(d, {'roo-data-checked' : 'checked'});
+ });
+ }
html[html.length] = Roo.util.Format.trim(
this.dataName ?
if(!keepExisting){
this.clearSelections(true);
}
+
if(this.fireEvent("beforeselect", this, node, this.selections) !== false){
Roo.fly(node).addClass(this.selectedClass);
this.selections.push(node);