squ3lch
16 Nov 2009, 6:50 AM
I have the following action:
var deselectQueues = new Ext.Action({
text: 'Deselect All',
handler: function(){
Ext.each(Ext.getCmp('queuesChkBxGp').items.items, function(item) {
alert(item.id);
}, Ext.getCmp('queuesChkBxGp'));
}
});It is called by a button and references the following checkboxgroup:
{
xtype: 'checkboxgroup',
cls: 'chkbxGrpIndent',
id: 'queuesChkBxGp',
hideLabel:true,
columns:1,
border:false,
items:[
{boxLabel: 'Queue 1',name: 'filter-q-m-48',id:'filter-q-m-48',checked:true},
{boxLabel: 'Queue 2',name: 'filter-q-m-1',id:'filter-q-m-1',checked:true}
]
}When I click the button, I receive one JS alert with "undefined" as the message, where I would expect to receive two consecutive alerts each with a different id. Is my each syntax correct? Have I missed something else?
Thanks in advance.
var deselectQueues = new Ext.Action({
text: 'Deselect All',
handler: function(){
Ext.each(Ext.getCmp('queuesChkBxGp').items.items, function(item) {
alert(item.id);
}, Ext.getCmp('queuesChkBxGp'));
}
});It is called by a button and references the following checkboxgroup:
{
xtype: 'checkboxgroup',
cls: 'chkbxGrpIndent',
id: 'queuesChkBxGp',
hideLabel:true,
columns:1,
border:false,
items:[
{boxLabel: 'Queue 1',name: 'filter-q-m-48',id:'filter-q-m-48',checked:true},
{boxLabel: 'Queue 2',name: 'filter-q-m-1',id:'filter-q-m-1',checked:true}
]
}When I click the button, I receive one JS alert with "undefined" as the message, where I would expect to receive two consecutive alerts each with a different id. Is my each syntax correct? Have I missed something else?
Thanks in advance.