PDA

View Full Version : Lazy loaded tree of many models



jpooley
17 Sep 2012, 6:11 AM
I am writing an application using the MVC approach of ExtJS 4.1.

The application will have three panels, a header panel (North), a Navigation tree panel (West), and Main Forms Panel (Center).
The header panel contains a combo box where a user can select a business.
The selection of a business should trigger the navigation tree panel to be loaded with the business as the root.
Clicking on Vendors, Customers or Categories should lazy load the relevant entities, and so on down the tree.
e.g.
Business A

Vendors


Vendor A


ProductLines


ProductLine A


Products


Product 1
Product 2
Product 3

ProductLine B


Products


Product 4
Product 5

ProductLine C


Products

Product 6

Vendor B


ProductLines


ProductLine C


Products


Product 7
Product 8


Customers


Customer A
Customer B
Customer C

Categories


Category A
....




I then want to add Create, Review, Update and Delete (CRUD) functionality to the tree, so that I can fully manage the business entities.
Each different type of entity within the business tree will have a different model so I will need to be able display the relevant form /view for that enity.
Ideally the tree should automatically reflect all of the CRUD changes, and keep its state (i.e. if nodes are expanded or selected, they should remain so.)
Doe anyone have any simple examples of how to accomplish this task?

mitchellsimoens
24 Sep 2012, 7:09 AM
What have you gotten working thus far?