1. #1
    Sencha User
    Join Date
    Mar 2011
    Posts
    12
    Vote Rating
    0
    mjbcesar is on a distinguished road

      0  

    Default Models and TreePanel

    Models and TreePanel


    Hey Guys!

    In this project i'm working on I've got a navigation panel based on a panel (layout accordion) and inside each accordion panel i'll have a treepanel.

    And because the navigation panel is based on user permissions i have to generate the data when the user logs in.

    So my logic structure is something like this:

    Module (panel inside the accordion)
    - (has many) Folders (tree node)
    - (have many / or not) Folders (tree node)
    - (have many / or not) Actions (tree node - leaf)


    I created models for Modules, Folders and Actions (and the respective stores as well) and my PHP generated JSON is loaded perfectly into the models (relations aswell).

    MY PROBLEM IS:

    The tree requires a treestore, right? I have a regular Store.
    SO, should i implement a DataView and try to mimic the TreePanel or should I ignore all the work i've done and all the models and have the server produce a TreeStore JSON? Maybe there's a third option...

    Thank you very much.

  2. #2
    Sencha User
    Join Date
    Apr 2010
    Location
    Berlin
    Posts
    19
    Vote Rating
    0
    vollchraZ is on a distinguished road

      0  

    Default


    I had the same problem and my solution was to create a treepanel without a store and a simple root node. after all stores are loaded, I manualy added nodes based on my associations.
    may be this helps you.
    greetings vollchraZ

  3. #3
    Sencha User
    Join Date
    Mar 2011
    Posts
    12
    Vote Rating
    0
    mjbcesar is on a distinguished road

      0  

    Default


    Hey vollchraZ!

    Thank you for your reply.

    That seems to be a nice solution, i'll wait for some more input though, and if nothing more... simple comes along I'll go with you solution for sure.

    Thank you again.

Similar Threads

  1. Grid with 2 associated models
    By vadimv in forum Ext: Discussion
    Replies: 1
    Last Post: 2 May 2011, 4:03 AM
  2. 4.0 Ext.define now for Models. Why?
    By jay@moduscreate.com in forum Community Discussion
    Replies: 3
    Last Post: 27 Apr 2011, 4:23 PM
  3. Need help with Models
    By Hertz in forum Sencha Touch 1.x: Discussion
    Replies: 0
    Last Post: 22 Feb 2011, 3:55 PM
  4. models inside models
    By kortovos in forum Sencha Touch 1.x: Discussion
    Replies: 2
    Last Post: 27 Sep 2010, 3:43 AM
  5. How do I write models?
    By mwmcmullen in forum Ext GWT: Discussion
    Replies: 0
    Last Post: 26 Apr 2010, 5:30 AM

Thread Participants: 1

Tags for this Thread

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