In an MVC style Ext JS 4 application, assuming I have a single controller/view/store/model and that loads up properly- for an example, let’s say this example is my code base.
My application loads up a view with a grid (list of Users), then when a row is clicked it opens and edit (User) view with a form.
Now, I want to add additional views to be displayed inside that form.
For example, I want to show a ‘last 10 logins’ (a list of activity records for the user) below the fields in the User form. I will have a separate view/controller/model/store for ‘ActivityLog’. So I need to create the ActivityLog List view/controller and place it inside my User view (it will also have it’s own code/logic to handle clicks on those records in it’s grid, etc.).
Is that the correct approach?
Would the User controller load the view/controller of ActivityLog and somehow place it in to the User edit view, or do I have config data directly inside the User edit view that loads it in ?
Ok. Probably you can use something like this
// Navigation controller
// Users controller
// ActivityLog controller
// Also you should have tree view files
// navigation.TabHost
// users.List
// activitylog.List
Navigation controller will create widges and insert them to its tabhost.
But ActivityLog and Users Controllers will manipulate their views.