PDA

View Full Version : Sencha Touch Nestedlist JSON format Example



shah_ankitb
1 Dec 2010, 9:13 PM
Hello Friends,
I'm new to sencha. Using Sencha touch. I would like to make nested listing like first of list comes, when click on one of the link it goes to another listing, when click on second list's any link it opens image like that.

http://dev.sencha.com/deploy/touch/examples/nestedlist/

Above example is perfectly suitable for this one more than that below application.
http://touchstyle.mobi/app/

When i'm doing any modification in
http://dev.sencha.com/deploy/touch/examples/nestedlist/
it gives no error or warning i'm using Fedora 11 linux Google Chrome.
Can anybody tell me what is the JSON perfect format for this nested listing. I will do it for dynamic.
So if anyone help to get static nested list it would be better.

Steffen Hiller
3 Dec 2010, 5:49 PM
check examples/kitchensink/carregions.json



{
"text": "Cars",
"items": [{
"text": "Asia",
"items": [{
"text": "Japan",
"items": [{
"text": "Acura",
"leaf": true
},{
"text": "Honda",
"leaf": true
},{
"text": "Infiniti",
"leaf": true
},{
"text": "Mitsubishi",
"leaf": true
},{
"text": "Nissan",
"leaf": true
},{
"text": "Scion",
"leaf": true
},{
"text": "Subaru",
"leaf": true
},{
"text": "Toyota",
"leaf": true
}]
},{
"text": "Korea",
"items": [{
"text": "Hyundai",
"leaf": true
},{
"text": "Kia",
"leaf": true
}]
}]
},{
"text": "United Kingdom",
"items": [{
"text": "Aston Martin",
"leaf": true
},{
"text": "Bentley",
"leaf": true
},{
"text": "TVR",
"leaf": true
},{
"text": "Land Rover",
"leaf": true
}]
},{
"text": "Europe",
"items": [{
"text": "Germany",
"items": [{
"text": "Audi",
"leaf": true
},{
"text": "BMW",
"leaf": true
},{
"text": "Opel",
"leaf": true
},{
"text": "Porsche",
"leaf": true
},{
"text": "Volkswagen",
"leaf": true
}]
},{
"text": "France",
"items": [{
"text": "Citro├źn",
"leaf": true
},{
"text": "Renault",
"leaf": true
},{
"text": "Peugeot",
"leaf": true
}]
}]
},{
"text": "United States",
"items": [{
"text": "Buick",
"leaf": true
},{
"text": "Cadillac",
"leaf": true
},{
"text": "Chevrolet",
"leaf": true
},{
"text": "Chrysler",
"leaf": true
},{
"text": "Ford",
"leaf": true
},{
"text": "Jeep",
"leaf": true
},{
"text": "Oldsmobile",
"leaf": true
},{
"text": "Saturn",
"leaf": true
},{
"text": "Tesla",
"leaf": true
}]
}]
}

madhusudhan
20 Jan 2011, 2:26 AM
Hello shah_ankitb

Could you pls tell me how you created the nested list dynamically?

Thanks

danmux
23 Jan 2011, 11:43 PM
madhusudhan

This thread and a few others show how you can create the nodes in a NestedList programmatically from an ajax call...

http://www.sencha.com/forum/showthread.php?120147-NestedList-and-TreeStore-with-ajax-proxy&highlight=NestedList+Json