View Full Version : No more data available in JsonStore when using MetaData property

2 Feb 2010, 6:00 AM
Hi there!

I'm using the organizer example for displaying an image gallery view. Everything works fine so far but when I add a MetaData field (as described in the api docs) to the server's Json response which passes some custom properties to my Store object the store's data items and keys fields remain empty. The firebug console also shows that those data fields are empty whereas reader > JsonData holds an element metaData with the proper fields and data returned by my server.

How can I access my metaData? Shouldn't it be available in the store's regular data object?

The Json data returned by the server (I truncated the "result" data) :


The ExtJs part:

// Set up images view

var view = new Ext.DataView({
itemSelector: 'div.thumb-wrap',
multiSelect: true,
plugins: new Ext.DataView.DragSelector({dragSafe:true}),
store: new Ext.data.JsonStore({
url: '/xbm/builds/0912/data/data.MyImages.php',
autoLoad: false
tpl: new Ext.XTemplate(
'<tpl for=".">',
'<div class="thumb-wrap" id="{name}">',
'<div class="thumb"><table cellspacing="0" cellpadding="0" border="0"><tr><td height="80" width="80" align="center" valign="middle"><img src="{url}" class="thumb-img" width="{thumb_width}" height="{thumb_height}" title="{name}" /></td></tr></table></div>',

view.store.load({params:{start: 0, limit: 15}});


When I return the server Json response without the metaData the data is displayed, with the metaData it's not.

Any idea what I'm doing wrong here???

Thanks in advance for your help