-
27 Dec 2011 10:24 PM #1
ExtJS 4 Nested Data Loading in other way
ExtJS 4 Nested Data Loading in other way
I think nested data loading in ExtJS 4 is not applicable in real life. For example, I have some models for trainings, for users, and some model which describes how trainings assigned to users, which user assigned training, etc. I think it's wrong to get join in PHP Model (I use ZF 1.x) to get users first names and last names instead their identifiers, and it's wrong to merge data from two selects (select join with traings and trainings-to-users table and select from users where identifier in (list of identifiers from join above)) in Controller. Good practise to do it in View, isn't it? But ExtJS 4 nested data loading tells me: make hierarchial structure (with a lot of duplicates of nested data!) and pass it me. Why I need to do this work? I'll better merge data in Controller! My final question is: if I have JSON like this:
Can I to create another nested data loading from this data? Thanks.Code:{ trainings: [{"id":"1", "user_id":"278","assigner_id":"30", ...},{...}], users: ["278":{"firstname":"Guy", "lastname":"Fawkes"},"300":{....},...] }
-
28 Dec 2011 8:50 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,624
- Vote Rating
- 434
Associations work but not really in widgets. You have to handle the getters before feeding them to widgets.
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
28 Dec 2011 10:04 PM #3
Can you give me some pseudo-code? And what you mean in phrase "Associations work but not really in widgets"?


Reply With Quote