Nov 13, 2009, 2:03 PM
[CLOSED] ReaderID in ArrayReader
Hello,
I have the store defined like this:
Anyway, the above definition translates to this
Regards,
Tadeusz
I have the store defined like this:
<ext:Store ID="store" runat="server">
<Reader>
<ext:ArrayReader ReaderID="Id" >
<Fields>
<ext:RecordField Mapping="Name" />
<ext:RecordField Name="Id" Mapping="Id" Type="Int" />
</Fields>
</ext:ArrayReader>
</Reader>
</ext:Store>
I use Mapping attributes, because Name attributes don't work unlike in JsonReader.Anyway, the above definition translates to this
new Ext.ux.data.PagingStore({
id: "filter_store",
ajaxEventConfig: {
formProxyArg: "mainForm"
},
reader: new Ext.data.ArrayReader({
id: "1",
fields: [{
mapping: "Name",
name: "Name"
},{
type: "int",
mapping: "Id",
name: "Id"
}]
})
As you can see, ArrayReader.id is set to "1" which in my opinion should be "Id". With "1" store.getById() method just doesn't work, as "1" is no property in data.Regards,
Tadeusz