PDA

View Full Version : Help binding json to list



kgilb
22 Oct 2010, 12:39 PM
Hello,

I just started working through the sencha api, and I need some help with binding json to a list. I successfully changed the twitter sample app to load my json data, but I want it to bind to a list instead of the Ext.Component that is used in the GeoTweets example.

Here is my sample json data that is returned from my server:

[{"Sym":"DRC"},{"Sym":"AA"},{"Sym":"VZ"},{"Sym":"BEN"},{"Sym":"BF.B"},{"Sym":"CEG"},{"Sym":"BHI"},{"Sym":"ALV"},{"Sym":"BK"},{"Sym":"WRB"},{"Sym":"KMX"},{"Sym":"BLL"},{"Sym":"BMC"},{"Sym":"BMS"},{"Sym":"BMY"},{"Sym":"BOH"},{"Sym":"BOKF"},{"Sym":"HST"},{"Sym":"WYNN"},{"Sym":"BPOP"}]

How do I go about loading this into a List from a URL?

tomalex0
23 Oct 2010, 12:20 AM
You can use List Component for that. Did you checked List Examples of sencha?
http://dev.sencha.com/deploy/touch/examples/list/

Make a server request from the store that is specified for List.

Also its explained in Documentation .
http://dev.sencha.com/deploy/touch/docs/?class=Ext.List