PDA

View Full Version : DataView.getRecord broken in 3.3, or is it just me?



aadaam
29 Oct 2010, 1:41 AM
Hi all,

I have some [phantom, so, not saved] records in a dataview.

I have a click event, and obviously, I want to get the records.

I use this:

listeners: {
click:function(cmp, idx, node){
console.log(cmp.getRecord(node))
}
}
This is always undefined.

I tried with index, it's always -1.

Records are created with:

someFunction(stateobj, delay) {
var record = new myStore.recordType();
record.set('state', Ext.apply({},stateObj));//forced copy instead of reference
record.set('time', delay);
myStore.add([record]);
}

Where


var myStore = new Ext.data.JsonStore({
fields:['time', 'state'],
data: [
]
});

OK, found it: itemSelector missing... sorry...