Gelmiş geçmiş en büyük porno sitemiz olan 2pe de her zaman en kaliteli pornoları sunmayı hedefledik. Diğer video sitemiz olan vuam da ise hd porno ağırlıklı çalışmalara başladık.

  1. #1
    Sencha User
    Join Date
    Oct 2011
    Posts
    6
    Vote Rating
    0
    prakadam is on a distinguished road

      0  

    Question Nested List and JSON

    Nested List and JSON


    Hi,

    I am new to Sencha Touch and trying to build a app to display the songs list. Below is my JSON file which I have used to display the list of songs using nested list. Now I am trying to get 1) list of Albums names only (Album 1, Album 2 .. first level children.. so that I can display the list in Select / Check box. and 2) List of songs from specific album directly using assigned id to Album Node... like list songs from Album 2.
    I am looking into API and also in the forum if someone has posted this earlier.
    Thanks for your help in advance!

    { "items": [ {
    "model":"Songs",
    "text": "Songs",
    "leaf": false,
    "items": [ {
    "id":"1",
    "model": "Album",
    "text": "Album 1",
    "leaf": false,
    "items": [ {
    "model" : "Song",
    "text": "Song 1",
    "Singer": "Singer 1",
    "year": "2010 ",
    "leaf": true },
    { "model" : "Song",
    "text": "Song 2",
    "Singer": "Singer 2",
    "year": "2010 ",
    "leaf": true
    } ]
    }, {
    "id":"2",
    "model" : "Album",
    "text": "Album 2",
    "leaf": false,
    "items": [ {
    "model" : "Song",
    "text": "Song 3",
    "Singer": "Singer 3",
    "year": "2010 ",
    "leaf": true
    }, {
    "model" : "Song",
    "text": "Song 4",
    "Singer": "Singer 4",
    "year": "2010 ",
    "leaf": true
    } ]
    } ]
    }]
    }

  2. #2
    Sencha User
    Join Date
    Oct 2011
    Posts
    10
    Vote Rating
    1
    curmil is on a distinguished road

      0  

    Default


    Have you watched the screencast on the nested list component in which an app is built that does exactly what you're trying to do?

    http://www.sencha.com/learn/intro-to...ist-component/

  3. #3
    Sencha User
    Join Date
    Oct 2011
    Posts
    72
    Vote Rating
    3
    TDeBailleul is on a distinguished road

      0  

    Default


    It would also be easier for us to help you if you'd put you code between [CODE ] [ /CODE]

  4. #4
    Sencha User
    Join Date
    Oct 2011
    Posts
    6
    Vote Rating
    0
    prakadam is on a distinguished road

      0  

    Default Thanks!

    Thanks!


    Thanks a lot for your reply! Sorry for not using the Code block...

    Actually this example as well as the example from the Kitchen Sink / Data / Nested Loading (not UserInterface / NestedList)... helped me to the get the data. First I have to define the models with association, apply the filter to get the data for the particular Album. (e.g. id = 2). And then use the TPL to get the child data. Once you apply the filter and get the data for another Album, I have to clear the filter to get the complete data and apply the filter again for different id (id =1). The issue which I faced after that was displaying the list (got from Nested Loading TPL) same as that of Nested List example. I wrote my own CSS and applied to both make it look closer.

Thread Participants: 2

Tags for this Thread