Extjs: XmlReader record mapping problem








The problem is described here.


Ext.onReady(function(){
var readerTop10 = new Ext.data.XmlReader({
record: 'top10_product'
}, [
{name: 'unid', mapping: '@id'},
{name: 'product', mapping: new String()}
]);

var storeTop10 = new Ext.data.Store({
url: 'http://someurl.xml',
reader: readerTop10
});

var gridTop10 = new Ext.grid.GridPanel({
store: storeTop10,
columns: [
{header: "ID", dataindex:'unid'},
{header: "Product", dataindex: 'product'}
],
renderTo:document.body,
loadMask: true,
title:'Top 10 producten',
});

storeTop10.load();
});



1 comment: