UbuntuPenguin
6 Aug 2012, 6:01 PM
Hello Everyone,
I have a Combobox and it loads search results into its dropdownlist. I can see the contents of the dropdown list just fine, but when I select one it doesn't populate the 'selectedItem' part of the Combobox. I've tried each and every configuration I have found on the internet to no avail.
Any help is greatly
Here is the offending code.
Ext.require('KesslerAdmin.model.LineItemType');
ds = Ext.create('Ext.data.Store', {
model: 'KesslerAdmin.model.LineItemType',
proxy: {
type:'ajax',
url:'line_item_type/search_by_product_type.json',
reader:{
type:'json'
}
}
});
Ext.define('KesslerAdmin.view.items.LineItemLiveSearchCombobox', {
extend:'Ext.form.ComboBox',
alias:'widget.lineitemslivesearchcombobox',
initComponent:function () {
var me = this;
me.store = ds,
Ext.applyIf(me, {
displayField: 'product_type',
width: 500,
labelWidth: 130,
queryMode: 'local',
typeAhead: true,
listConfig: {
loadingText: 'Searching...',
emptyText: 'No matching line items found.',
getInnerTpl: function() {
return '<div class="search-item">' +
'<h3><span>{product_type}</span></h3>' +
'</div>';
}
}
});
me.callParent(arguments);
}
});
I have a Combobox and it loads search results into its dropdownlist. I can see the contents of the dropdown list just fine, but when I select one it doesn't populate the 'selectedItem' part of the Combobox. I've tried each and every configuration I have found on the internet to no avail.
Any help is greatly
Here is the offending code.
Ext.require('KesslerAdmin.model.LineItemType');
ds = Ext.create('Ext.data.Store', {
model: 'KesslerAdmin.model.LineItemType',
proxy: {
type:'ajax',
url:'line_item_type/search_by_product_type.json',
reader:{
type:'json'
}
}
});
Ext.define('KesslerAdmin.view.items.LineItemLiveSearchCombobox', {
extend:'Ext.form.ComboBox',
alias:'widget.lineitemslivesearchcombobox',
initComponent:function () {
var me = this;
me.store = ds,
Ext.applyIf(me, {
displayField: 'product_type',
width: 500,
labelWidth: 130,
queryMode: 'local',
typeAhead: true,
listConfig: {
loadingText: 'Searching...',
emptyText: 'No matching line items found.',
getInnerTpl: function() {
return '<div class="search-item">' +
'<h3><span>{product_type}</span></h3>' +
'</div>';
}
}
});
me.callParent(arguments);
}
});