Thylia
31 Aug 2007, 2:20 AM
This code goes if I use the HttpProxy but not if I use MemoryProxy
var reader = new Ext.data.JsonReader({
root:'LstChamps',
totalProperty:'NbChamp',
id:'CodCha'
},Ext.data.Record.create([
{name:'LabCha', mapping:'LabCha' },
{name:'CodCha', mapping:'CodCha' },
{name:'widthcolumn', mapping:'widthcolumn'},
{name:'labelWidth', mapping:'labelWidth' },
{name:'widthfield', mapping:'widthfield' },
{name:'Fmt', mapping:'Fmt' },
{name:'Lenght', mapping:'Lenght' },
{name:'Option', mapping:'Option' },
{name:'FctTst', mapping:'FctTst' },
{name:'TabTst', mapping:'TabTst' },
{name:'TabGuide', mapping:'TabGuide' },
{name:'CodGuide', mapping:'CodGuide' },
{name:'Ong', mapping:'Ong' },
{name:'DatGuide', mapping:'DatGuide' }
]));
this.SaiGriStore = new Ext.data.Store({
// proxy: new Ext.data.HttpProxy({url:'SaiChamps.js'}),
proxy: new Ext.data.MemoryProxy(Exemple.responseArray),
reader: reader
});
this.SaiGriStore.load();
this.SaiGriStore.on('load', function() {
alert('ok');
});
var reader = new Ext.data.JsonReader({
root:'LstChamps',
totalProperty:'NbChamp',
id:'CodCha'
},Ext.data.Record.create([
{name:'LabCha', mapping:'LabCha' },
{name:'CodCha', mapping:'CodCha' },
{name:'widthcolumn', mapping:'widthcolumn'},
{name:'labelWidth', mapping:'labelWidth' },
{name:'widthfield', mapping:'widthfield' },
{name:'Fmt', mapping:'Fmt' },
{name:'Lenght', mapping:'Lenght' },
{name:'Option', mapping:'Option' },
{name:'FctTst', mapping:'FctTst' },
{name:'TabTst', mapping:'TabTst' },
{name:'TabGuide', mapping:'TabGuide' },
{name:'CodGuide', mapping:'CodGuide' },
{name:'Ong', mapping:'Ong' },
{name:'DatGuide', mapping:'DatGuide' }
]));
this.SaiGriStore = new Ext.data.Store({
// proxy: new Ext.data.HttpProxy({url:'SaiChamps.js'}),
proxy: new Ext.data.MemoryProxy(Exemple.responseArray),
reader: reader
});
this.SaiGriStore.load();
this.SaiGriStore.on('load', function() {
alert('ok');
});