0

There is a defined store in a.js

Ext.define('Prg.ds.activeAdCamps', { extend: 'Ext.data.Store',
    model : basicModel,
    proxy: {
        type: 'ajax',
        actionMethods: {create :'POST',read:'POST',update:'POST',destroy:'POST'},
        url: 'combo/activeAdCamps',
        reader: {
            type: 'json',
            root: 'root'
        }
    }
});

and in b.js I defined local variable as defined Store above:

77: ... 78: var ds_activeAdcamps = new Prg.ds.activeAdCamps(); 79: ds_activeAdcamps.load(); 80: ...

I am using this kind of stores for other combos, too, and there is no any problem with them. even, I want to use this store exactly same way that I used before, I am getting this error message in my console:

Uncaught TypeError: undefined is not a function index:78
report_adcamp_onready index:78
(anonymous function)
handleSuccess pro_magic.js:208
Ext.apply.callback ext-all.js:15
Ext.define.onComplete ext-all.js:15
Ext.define.onStateChange ext-all.js:15
(anonymous function) ext-all.js:15

On my local computer, first it gives same error, I dont get it why, after a time period, it works as it is expected... However, on the server, I am still getting this error.

efirat
  • 3,679
  • 2
  • 39
  • 43

1 Answers1

0

ExtJs, first, looks for library NS if it defined, if there is no definition than it is looks for script file as converting dots to slash.. that is

if you define:

var localStore = new Prg.ds.activeAdCamps();

if there is no definition found named as "Prg.ds.activeAdCamps" than it looks

BASEDOMAIN/Prg/ds/activeAdCamps.js

if it still cannot find script file than it throw "Uncaught TypeError"...

efirat
  • 3,679
  • 2
  • 39
  • 43