You often need View in View.
For example, a client that has many phone numbers. So you create a view for the client:
- app/view/client/Edit.js
and you create two views for the phone numbers:
- app/view/phone/Edit.js
- app/view/phone/List.js
What is the way to "tie" them properly? (I mean in the client Edit view, show Phones of this client (and only of this one)).
I've already gone through those examples, and I've made my custom MVC based on those "lessons" (that are far from being usable for making professionnal stuff):
- http://docs.sencha.com/ext-js/4-0/#/guide/application_architecture
- http://www.sencha.com/learn/the-mvc-application-architecture/
- http://www.sencha.com/learn/architecting-your-app-in-ext-js-4-part-1
- http://www.sencha.com/learn/architecting-your-app-in-ext-js-4-part-2
You can test my example at my website here:
http://doonoo.com/intranet/gs.php
This is a full CRUD system (no CRUD example could be found with the MVC tutorials (and this is "kind of" important to me)).
But now I'd like to make another (model + store + view) about "phone", but when we edit the user, I want to display his/her own phone numbers, and (maybe) add / delete their phone numbers. This is kind of "opening a user view, which contains a phone view that is filtered with the user id".
Any idea / suggestion? What I've come so far is to create the "phones" view into the "edit user view" but I don't know how to apply the filter. I'm stuck.
Any idea welcome!!
Here's how it should work: