javascript - ExtJS 5 requests file with empty name /.js -
i've made fresh workspace latest sencha cmd 5.0.2.270 , latest extjs 5.0.1. generated app in. wrote little bit of code.
i generate production build sencha app build.
the development loads well, production build tries load file no name , gets 404
get http://yassa-built.dev/.js?_dc=1410352524548 404 (not found) after error doesn't load @ all.
i can't understand searching for. development not complaining @ all.
i made archive https://mega.co.nz/#!dk0gdrjd!dnitsq1fgfs5t4d-4yyfna6_k6ecahfkxoeejaju7my (~600kb). includes sources , production build.
upd i've found place starts break. in file radioadmincontroller.js.
case 'menu_referals': return app.setsubview('redmed-radioapp-referals', { store: ext.create('redmedadmin.store.referals') });
if not create store - works. production build ok. store nothing special:
ext.define('redmedadmin.store.referals', { extend: 'ext.data.store', model: 'redmedadmin.model.referal', autoload: false, autosync: true });
on fourth day of struggling simple answer revealed.
i've missed 1 dependency. chain: redmedadmin.store.referals -> redmedadmin.model.referal -> redmedadmin.model.redmed.radioappbase.
as provided archive, list class redmedadmin.model.redmed.radioappbase here (working version):
ext.define 'redmedadmin.model.redmed.radioappbase', extend: 'ext.data.model' requires: ['ext.data.identifier.uuid', 'ext.data.proxy.rest'] identifier: 'uuid' fields: [{ name: 'id' type: 'string' }] schema: namespace: 'redmedadmin.model.redmed.radioapp' proxy: type: 'rest' url: 'http://10.0.29.140:6543/api/rest/{entityname:lowercase}' reader: type: 'json' rootproperty: '{entityname:lowercase}' listeners: 'exception': (request, operation, eopts ) -> ext.log {level: 'error'}, "data request #{request.url} failed. reply: #{operation.responsetext}"
it defines schema children. schema uses rest proxy (type: 'rest'). wasn't included in broken version. ext.data.identifier.uuid listed in requires.
Comments
Post a Comment