1. #1
    Sencha User
    Join Date
    Jan 2012
    Posts
    25
    Vote Rating
    0
    grnadav is on a distinguished road

      0  

    Default 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:
    Code:
    [
        {
            "name": "General",
            "contexts": [
                {
                    "name": "User Profile",
                    "settings": [
                        {
                            "valuesList": [
                                {
                                    "name": "Name1",
                                    "key": "key1"
                                },
                                ....
                            ],
                            "required": true
                        },
                        ........
                    ],
                 ......
            ]
       }
    ]
    Can this be modeled in a single Ext.data.Model?

    Thanks,
    Nadav

  2. #2
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    8,884
    Vote Rating
    440
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

  3. #3
    Sencha User
    Join Date
    Jan 2012
    Posts
    25
    Vote Rating
    0
    grnadav is on a distinguished road

      0  

    Default


    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

Thread Participants: 1

Tags for this Thread