6 May 2011 7:40 AM #1
Models and TreePanel
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.
6 May 2011 8:03 AM #2
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.
6 May 2011 8:08 AM #3
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.
By vadimv in forum Ext: DiscussionReplies: 1Last Post: 2 May 2011, 4:03 AM
By email@example.com in forum Community DiscussionReplies: 3Last Post: 27 Apr 2011, 4:23 PM
By Hertz in forum Sencha Touch 1.x: DiscussionReplies: 0Last Post: 22 Feb 2011, 3:55 PM
By kortovos in forum Sencha Touch 1.x: DiscussionReplies: 2Last Post: 27 Sep 2010, 3:43 AM
By mwmcmullen in forum Ext GWT: DiscussionReplies: 0Last Post: 26 Apr 2010, 5:30 AM