1. #1
    Sencha Premium Member
    Join Date
    May 2012
    Location
    Davenport, IA
    Posts
    32
    Vote Rating
    1
    wmcnamara is on a distinguished road

      0  

    Question Concepts on how to use Treepanel with Complex nested data?

    Concepts on how to use Treepanel with Complex nested data?


    I'm looking for a cleaner way to use complex data in a Treepanel.

    I'm using a treepanel for hierarchical data manipulation the problem is different levels in the hierarchy cab be completely different model sets, not to mention different models could in theory be on the same level.

    Currently, I have a large model defined for my treestore, that encompasses all the parameters for every different type of data. and I'm using a naming convention on my ID's to identify what is of what type "thetype|####", in which case I have switch statements after spiting on the pipe, its far from a clean solution to the problem.

    My next Idea, that I've gotten semi working, was to make several models, with associations, and when my application launches, decorate all the model constructors as node interfaces, that way I can insert different models all together into the tree. None the less, it still feels hack y in nature, though much cleaner then my current implementation.

    My final idea, would be to have a simple treestore model, with "look up" identifiers, to point to other stores for each of the models of the data I'm manipulating in my application. But I'm unsure of a clear way to implement this both client, and server side. It would require multiple stores requesting data from the server at once, and than as they load using the associations to populate the treestore for the treepanel, sounds even less clean than the above ideas.

    So my question is how have others Implemented complex nested data into a treestore, and what would you suggest I do?

    I'd love to get input from the Architect team, they've seem to implemented complex nested data manipulation into there Project Inspector.

  2. #2
    Sencha - Support Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    6,033
    Vote Rating
    213
    slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of

      0  

    Default


    You may find doing the data normalization on the server side more performant.

Thread Participants: 1