Hi Everyone,

I am new to ExtJS . I am interested in creating a custom xtype which is a simple drop down ( xtype : selection & type select) but with the options pre loaded .These options should be fetched dynamically from a URL.This drop down will be used across the site multiple times.

Code is provided below . Options set to the drop down as shown below are not displayed in the the drop down

MyNamespace = MyNamespace || {};

MyNamespace.CustomSelection = Ext.extend(CQ.form.Selection, {
constructor: function (config) {
config = config || {};
var defaults = {
type: "select",
};
config = Util.applyDefaults(config, defaults);
MyNamespace.CustomSelection.superclass.constructor.call(this, config);
},

initComponent: function () {
MyNamespace.CustomSelection.superclass.initComponent.call(this);
this.options = [{
'text': 'ALL',
'value': 'all'
}, {
'text': 'Text1',
'value': 'Value1'
}, {
'text': 'Text2',
'value': 'value2'
}, {
'text': 'Text3',
'value': 'Value3'
}];
}

});

Ext.reg('customxtype',MyNamespace.CustomSelection);
Should I overwrite any method to load the options be default ?


Regards,
Krishna