Hi all!
Ia m having an issue with Proxy configured in Model.
You can find example here http://wap7.ru/folio/ext-model-proxy/index.html?debug
Code:
Ext.onReady(function () {
Ext.define('Company', {
extend: 'Ext.data.Model',
fields: [{
name: 'name'
}],
proxy:{
type:'rest',
url:'data.json',
reader:{
type:'json',
root:'data'
}
}
});
Ext.create('Ext.grid.Panel', {
store:Ext.create('Ext.data.JsonStore', {
model:'Company',
autoLoad:true
}),
columns:[
{
text:'Company name',
dataIndex:'name'
}
],
height:100,
width:600,
title:'Proxy in Model',
renderTo:'grid-example2'
});
});
buildUrl causes an error in request
- Uncaught TypeError: Cannot call method 'indexOf' of undefined ext-all-debug.js:5301
Ext.apply.urlAppend ext-all-debug.js:5301
Ext.define.buildUrl ext-all-debug.js:26013
Ext.define.buildRequest ext-all-debug.js:25856
Ext.define.doRequest ext-all-debug.js:26056
Ext.define.read ext-all-debug.js:25825
Ext.define.load ext-all-debug.js:44665
Base.callParent ext-all-debug.js:2891
Ext.define.load
Please give me a hint - what am i missing?