Results 1 to 3 of 3

Thread: Is it possible to have inlined models in associations or in fields?

  1. #1
    Sencha User
    Join Date
    Jan 2012
    Posts
    25
    Vote Rating
    0
      0  

    Default 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
    9,390
    Vote Rating
    498
      0  

  3. #3
    Sencha User
    Join Date
    Jan 2012
    Posts
    25
    Vote Rating
    0
      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

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •