Hybrid View

  1. #1
    Sencha User
    Join Date
    Oct 2012
    Posts
    1
    Vote Rating
    0
    juice1492 is on a distinguished road

      0  

    Default Loading multiple grids from json with multiple roots

    Loading multiple grids from json with multiple roots


    Is it possible to use a ListLoader and JSONReader to populate multiple grids from a multi-root json object? I'm attempting to load 3 grids -one for machines, one for mab and one for users - from the following JSON:

    {
    "machines" : [
    {
    "total" : "1",
    "user" : "dtc2100cc1bbd6e",
    "mac" : "00-21-cc-6d-b1-eb"
    },
    {
    "total" : "1",
    "user" : "dtc26009b242e86",
    "mac" : "00-26-B9-8E-42-62"
    }
    ],
    "mabs" : [
    {
    "total" : "1",
    "user" : "dtc2100cc1bbd6e",
    "mac" : "00-21-cc-6d-b1-eb"
    },
    {
    "total" : "1",
    "user" : "dtc26009b242e86",
    "mac" : "00-26-B9-8E-42-62"
    }
    ],
    "users" : [
    {
    "total" : "1",
    "user" : "dtc2100cc1bbd6e",
    "mac" : "00-21-cc-6d-b1-eb"
    },
    {
    "total" : "1",
    "user" : "dtc26009b242e86",
    "mac" : "00-26-B9-8E-42-62"
    }
    ]
    }

    I can easily extend JSONReader for each of the 3 roots, creating a MACJsonReader, MABJsonReader and UsersJsonReader but the ListLoader only accepts one reader.

  2. #2
    Sencha User
    Join Date
    May 2012
    Posts
    19
    Vote Rating
    0
    BionicGeek is on a distinguished road

      0  

    Default Create your own LoadHandler

    Create your own LoadHandler


    I ran into a similar issue a little while back and came up with a solution that should work for you.

    The details can be found in this thread:

    http://www.sencha.com/forum/showthread.php?248948-Can-the-GXT-JsonReader-(using-AutoBeans)-parse-complex-JSON-structures

Thread Participants: 1

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar