Created
July 23, 2009 08:48
-
-
Save alvin2ye/152547 to your computer and use it in GitHub Desktop.
Ext.data.ScriptTagProxy 跨域访问
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var ds = new Ext.data.Store({ | |
proxy: new Ext.data.ScriptTagProxy({ | |
url: 'http://extjs.com/forum/topics-remote.php' | |
}), | |
reader: new Ext.data.JsonReader({ | |
root: 'topics', | |
totalProperty: 'totalCount', | |
id: 'post_id' | |
}, [ | |
{name: 'title', mapping: 'topic_title'}, | |
{name: 'topicId', mapping: 'topic_id'}, | |
{name: 'author', mapping: 'author'}, | |
{name: 'lastPost', mapping: 'post_time', type: 'date', dateFormat: 'timestamp'}, | |
{name: 'excerpt', mapping: 'post_text'} | |
]) | |
}); | |
ds.load(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment