1. #1
    Sencha User
    Join Date
    Jun 2012
    Posts
    52
    Answers
    4
    Vote Rating
    2
    michael.parrott is on a distinguished road

      0  

    Default Unanswered: reference container config inside items config

    Unanswered: reference container config inside items config


    I have a custom config that I want to reference inside the items config of a container. How do I do this?

    Code:
    Ext.define( 'App.view.View',{
    	extend: 'Ext.Container',
    	config:
    	{
    		model: null, //Custom config
    		items:
    		[
    		{
    			title: 'Nested View',
    			xtype: 'view',
    			record: this.getModel() //How do I reference my custom config model here?
    		}
    		]
    	}
    } );

  2. #2
    Sencha User jerome76's Avatar
    Join Date
    Apr 2012
    Location
    New Jersey
    Posts
    1,149
    Answers
    132
    Vote Rating
    99
    jerome76 is just really nice jerome76 is just really nice jerome76 is just really nice jerome76 is just really nice jerome76 is just really nice

      0  

    Default


    You can try something like this:
    Code:
    Ext.define('App.view.View',{
        extend: 'Ext.Container',
        config:
        {
             //...
        },
        initialize: function(){
            var me = this,
                c  = me.config;
            
            me.add({
                title: 'Nested View',
                xtype: 'view',
                record: c.model
            });
            
            me.callParent(arguments);
        }
    });
    You can set your custom model config when using Ext.create()
    Code:
    Ext.create('App.view.View', {
        model: //reference your model here
    });

Thread Participants: 1

Tags for this Thread

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi