-
2 Apr 2012 4:30 AM #1
Is it possible to have inlined models in associations or in fields?
Is it possible to have inlined models in associations or in fields?
Hello
I have a complex data structure and would like to have it modeled.
But I would like to avoid creating the many sub-models that the data has, as they have no independent existence outside the scope of this data-structure
my data structure:
Can this be modeled in a single Ext.data.Model?Code:[ { "name": "General", "contexts": [ { "name": "User Profile", "settings": [ { "valuesList": [ { "name": "Name1", "key": "key1" }, .... ], "required": true }, ........ ], ...... ] } ]
Thanks,
Nadav
-
4 Apr 2012 5:56 AM #2
Please have a look at:
http://www.sencha.com/blog/ext-js-4-anatomy-of-a-model/
http://www.sencha.com/blog/countdown...4-data-package
Regards,
Scott.
-
4 Apr 2012 6:03 AM #3
Thanks Scott,
I am aware of the config. options of models, but was hoping to avoid defining models which are only used within other models (not to register them, just define them inline),
which in turn floods the codebase with models which are useless
Thanks


Reply With Quote