Looks like we can't reproduce the issue or there's a problem in the test case provided.
  1. #1
    Sencha User
    Join Date
    Mar 2009
    Posts
    240
    Vote Rating
    0
    r_honey is on a distinguished road

      0  

    Default NestedList should apply "defaults" configuration to child Lists in getListConfig

    NestedList should apply "defaults" configuration to child Lists in getListConfig


    The title says it all, NestedList today does not allow much flexibility in customizing child lists because of hard-coded xtype and tpl in getListConfig method.

    It should be more flexible and apply "defaults" configuration first and then use an applyIf to add important things like xtype, itemTpl etc. to ensure that the "defaults" config option takes precendence if specified.

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,095
    Vote Rating
    855
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    The defaults Object is applied to the child lists but not within getListConfig... when the item is being added to the parent
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    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 in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Mar 2009
    Posts
    240
    Vote Rating
    0
    r_honey is on a distinguished road

      0  

    Default


    Hi Mitchell, that is exactly my point.
    getListConfig today hard-codes the xtype for a card in the nested list. So if I want to customize a card, and I create a List derived base class and specify its xtype in NestedList's defaults, the same is NOT alllied because of hard-coded xtype in getListConfig.

    I had to sub-class NestedList, override getListConfig and then specify the xtype for my new List derived component to enable it to be used as a Card.

  4. #4
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,095
    Vote Rating
    855
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    But if you set the defaults object on the nestedlist... the children when added get the defaults. This is done when adding a component, not in getListConfig so this works 100%
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    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 in print!

    When posting code, please use BBCode's CODE tags.

  5. #5
    Sencha User
    Join Date
    Mar 2009
    Posts
    240
    Vote Rating
    0
    r_honey is on a distinguished road

      0  

    Default


    You still do not get what I am trying to say Mitchell.
    getListconfig has a hard-coded xtype for 'list'. If Touch does not hardcode it but specify it in config as:

    Code:
    config: {
      defaults: {
        xtype: 'list'
      }
    }
    That was we can easily override an individual card in the NestedList to be a List derived custom class.

Thread Participants: 1