Ext. UX. ComboBox = Function (Config ){
If (Ext. isarray (config. Store )){
VaR Store = [];
For ( VaR I = 0 , Len = Config. Store. length; I < Len; I ++ )
Store [I] = [Config. Store [I];
Config. Store = New Ext. Data. jsonstore ({
Fields :[ ' Valuefield ' , ' Displayfield ' ],
Data: config. Store
});
Config. valuefield = ' Valuefield ' ;
Config. displayfield = ' Displayfield ' ;
}
Ext. UX. ComboBox. superclass. constructor. Call ( This , Config );
}
Ext. Extend (ext. UX. ComboBox, ext. Form. ComboBox ,{
});
Ext. Reg ('Comboux', Ext. UX. ComboBox );
Usage:
{Width: " 233 " , Store: [{valuefield: " 1 " , Displayfield: " Male " }, {Valuefield: " 2 " , Displayfield: " Female " }, {Valuefield: "3 " , Displayfield: " Li Yuchun}], allowblank: false
, Fieldlabel: " Gender " , Mode: " Local " , Xtype: " Comboux " , Readonly: True, displayfield: " Displayfield " , Valuefield: " Valuefield "
, Name: " GM " , Triggeraction: " All " , Hiddenname: 'gm '}