digitalkaoz
2 Sep 2008, 5:22 AM
he guys,
i got a weird problem here...
i have a combox (working, solved the eval problem after reading this forum ;) ), and a store for the data.
the combobox renders fine, and the store-items are showing up if i pull the trigger...
but a selection of an item wont select it, the combobox collapses and nothing is selected...
here my code (i am filling the store on the fly so its initially empty)
getCombo : function(_id,_name,_vtype,_emptyText,_label){
Dcp.tpl.combos[_id] = {
xtype:'combo',
typeAhead: true,
mode: 'local',
forceSelection: true,
triggerAction: 'all',
selectOnFocus:true,
valueField:'name',
allowBlank:false,
fieldLabel: _label,
name: _name,
emptyText: _emptyText,
anchor: '100%',
tpl:new Ext.XTemplate(
'<tpl for="."><div class="x-combo-list-item">{name}({description})</div></tpl>'
),
store:new Ext.data.JsonStore({
fields :[
{name :'id'},
{name :'name'},
{name :'description'},
{name :'contact_id'},
],
data:[],
})
};
return Dcp.tpl.combos[_id];
}
maybe it has todo with my Xtemplate??
please help, if you know the answer :)
i got a weird problem here...
i have a combox (working, solved the eval problem after reading this forum ;) ), and a store for the data.
the combobox renders fine, and the store-items are showing up if i pull the trigger...
but a selection of an item wont select it, the combobox collapses and nothing is selected...
here my code (i am filling the store on the fly so its initially empty)
getCombo : function(_id,_name,_vtype,_emptyText,_label){
Dcp.tpl.combos[_id] = {
xtype:'combo',
typeAhead: true,
mode: 'local',
forceSelection: true,
triggerAction: 'all',
selectOnFocus:true,
valueField:'name',
allowBlank:false,
fieldLabel: _label,
name: _name,
emptyText: _emptyText,
anchor: '100%',
tpl:new Ext.XTemplate(
'<tpl for="."><div class="x-combo-list-item">{name}({description})</div></tpl>'
),
store:new Ext.data.JsonStore({
fields :[
{name :'id'},
{name :'name'},
{name :'description'},
{name :'contact_id'},
],
data:[],
})
};
return Dcp.tpl.combos[_id];
}
maybe it has todo with my Xtemplate??
please help, if you know the answer :)