stephan.raabe
23 Dec 2008, 12:59 AM
Hello,
is it possible to load an text file including a JSON string from the application storage directory from my air application to the grid data store?
Thanks,
Stephan
funkadelic
24 Dec 2008, 9:54 AM
it should work. The JsonStore & GridPanel definition whould look something like this (referencing the file in the app-storage directory using the app-storage:/ shortcut) :
var someJsonstore = new Ext.data.JsonStore({
url: 'app-storage:/some/text/file.js',
root: 'rows',
fields:[
{name: 'field1'},
{name: 'field2'},
{name: 'field3'}
]
});
var panel = new Ext.grid.GridPanel({
id: 'someId',
store: someJsonStore,
columns: [
{...}
]
});
Powered by vBulletin® Version 4.1.5 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.