won.rhee
2 Aug 2011, 3:43 PM
Hello All,
It's probably something simple, but cant seem to figure it out.
I have a Ext.List with listeners that dispatches to controller.
If I have onItemDisclosure, I can pass data to controller like this :
.....
this.list = new Ext.List({
store: this.store,
itemTpl: '{StoreCode} : {Name}<br><div class="address">{City}, {State2Code}, {Zip}</div> {distance} mi',
grouped: false,
onItemDisclosure: function(record){
Ext.dispatch({
controller: 'AFC',
action: 'test',
data: record.data
})
}
});
......
But I do not want to use onItemDisclosure. How can I use listeners/onItemTap/itemtap/ or select to pass data to controller?
So I want to do something like following but pass record.data to controller :
.....
this.list = new Ext.List({
store: this.store,
itemTpl: '{StoreCode} : {Name}<br><div class="address">{City}, {State2Code}, {Zip}</div> {distance} mi',
grouped: false,
listeners: {
select: function(record){
Ext.dispatch({
controller: 'AFC',
action: 'test',
data: record.data
})
}
}
});
......
What can I do?
It's probably something simple, but cant seem to figure it out.
I have a Ext.List with listeners that dispatches to controller.
If I have onItemDisclosure, I can pass data to controller like this :
.....
this.list = new Ext.List({
store: this.store,
itemTpl: '{StoreCode} : {Name}<br><div class="address">{City}, {State2Code}, {Zip}</div> {distance} mi',
grouped: false,
onItemDisclosure: function(record){
Ext.dispatch({
controller: 'AFC',
action: 'test',
data: record.data
})
}
});
......
But I do not want to use onItemDisclosure. How can I use listeners/onItemTap/itemtap/ or select to pass data to controller?
So I want to do something like following but pass record.data to controller :
.....
this.list = new Ext.List({
store: this.store,
itemTpl: '{StoreCode} : {Name}<br><div class="address">{City}, {State2Code}, {Zip}</div> {distance} mi',
grouped: false,
listeners: {
select: function(record){
Ext.dispatch({
controller: 'AFC',
action: 'test',
data: record.data
})
}
}
});
......
What can I do?