1. #1
    Sencha User
    Join Date
    Mar 2012
    Posts
    6
    Vote Rating
    0
    maephisto is on a distinguished road

      0  

    Default Unanswered: Dynamic addition of fieldsets to panel

    Unanswered: Dynamic addition of fieldsets to panel


    In the code presented below, I define the layout of a web page. I have a panel and a fieldset within that panel - in this fieldset i have a select field -> when something gets selected in that select field I would like to add a few more fieldsets below the existing one, and make them invisible, showing only one of them.

    So the addition should be made dynamically, on the Change event of the selectfield. Can you give me some directions on this ?
    Thank you!

    Code:
    var layout = {
    ....
    this.panel = new Ext.form.FormPanel({
    
        fullscreen: true,
            scroll: 'vertical',
            defaults: {
                layout: {
                    pack: 'center'
                }
            },
    
            hidden: true,
            items: [
                    {
                        xtype: 'fieldset',
                        title: 'Filters',
                        defaults: {
                            labelWidth: '35%'
                        },
                        items: [
                            {
    
                                xtype: 'selectfield',
                                id: 'category_id',
                                label: 'Category',
                                valueField: 'code',
                                displayField: 'catname',
    
                                store: cStore,
                                listeners: {
    
                                    change: function (field, value) {
    
                                        //here i want to add the extra fieldsets
    
                                    });
                                }
                            }
                        ]
                    }
    
                    //this is where i want the new filedsets to be added
                    //{
                    //  xtype: 'fieldset',
                    //  title: 'Dynamic Fieldset',
                    //  ...
                    //}
    
    
            ]
    
    
    
    });
    
    }

  2. #2
    Sencha User
    Join Date
    Mar 2012
    Posts
    6
    Vote Rating
    0
    maephisto is on a distinguished road

      0  

    Default


    Please, mark this as solved.
    Its acually quite simple: I gave the panel an Id and did this :
    Code:
    Ext.getCmp('main_panel').add({			        	                            xtype: 'fieldset',
    			        	                            title: 'filters',
    			        	                            id: 'filtre_cat_id',
    			        	                            defaults: {
    			        	                                labelWidth: '35%'
    			        	                            },
    			        	                            items: [ 
                                                            
                                                        ]
    			        	                        });

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