Not able to make as alias or xtype of data field

264 Views Asked by At

I have defined like

Ext.define('Abc.view.component.model.RegModel', {
    extend: 'Ext.data.field.String',
    alias: 'regionModel',
    name: 'REGION',
});

 Ext.define('Abc.view.report.trig.Model', {
        extend: 'Ext.data.Model',
        alias: 'TRIG',
        fields: [
            { xtype:'regionModel'}
        ]
    });

xtype i have defined and used does not work. How do i create such thing?

2

There are 2 best solutions below

0
CD.. On BEST ANSWER

Use:

alias: 'data.field.regionModel'

Instead of:

alias: 'regionModel'

And in the Model use type instead of xtype.

(xtype is used for widget aliases only)

0
Arthanari C On