Hey everybody,
I have a Combobox assigned to a DirectStore. When the user inputs some text the Store send a request to the backendserver. Everything works fine so I can select the article from the Store and the value and displayFields gets populated.
But the Combobox is also member of a Dataform. When I load the model in the form all Fields get populated except the combobox. I think there is only the displayField missing.
But I checked that the valueField of the combobox will be filled if the article is still an item of the store. (e.g. last Search)
So is it possible to fill the displayField from the Load-Method of the Form e.g. by creating a model with a displayField and valueField for the Datafield of the article-number?
PHP Code:
{
{
xtype: 'combobox',
anchor: '100%',
listConfig: {
loadingText: 'Suche nach Artikeln...',
emptyText: 'Keinen Artikel mit dieser Artikelnummer gefunden!',
getInnerTpl: function() {
return '<div class="search-item"><b>{artikelnummer}</b><br>{kurztext}</div>';
}
},
itemId: 'artikelnummer',
name: 'artikelnummer',
fieldLabel: 'Artikelnummer',
selectOnFocus: true,
hideTrigger: true,
displayField: 'artikelnummer',
forceSelection: true,
minChars: 2,
queryCaching: false,
queryDelay: 50,
queryParam: 'queryArtikelnummer',
store: 'Artikelsuche',
typeAhead: true,
valueField: 'artikelnummer',
listeners: {
select: {
fn: me.onArtikelnummerSelect,
scope: me
}
}
},