1. #1
    Sencha User
    Join Date
    Feb 2008
    Posts
    116
    Vote Rating
    0
    buntyindia is on a distinguished road

      0  

    Default Extjs4 Formpanel data strore in variable

    Extjs4 Formpanel data strore in variable


    I am having a formpanel with no store currently. What I want to achieve is on clicking Apply button in that panel store the data object of that form in a variable in json form. How to achieve this?

    Here is my code:

    Code:
    Ext.define('Nits.view.PropertyPanelCmp', {
    			extend:'Ext.form.Panel', 
    			alias : 'widget.propertypanelCmp',
    			id: 'propertypanelCmp',
    			title: 'File properties',
    		    height: 500,
    		    width: 200,
    			draggable: false,
    			closable: false,	
    			//autoScroll:true,
    		    layout: {
    		        align: 'stretch',
    		        type: 'vbox'
    		    },
    		    fieldDefaults: {
    				labelWidth: 65
    			},
    		    bodyPadding: 10,	
    		
    		    initComponent: function() {
    		        var me = this;
    		        
    		        me.items = [
                    {
                        xtype: 'fieldset',
                        height: 108,
                        title: 'Common Properties',
                        items: [
                            {
                                xtype: 'textfield',
                                fieldLabel: 'Name',
                                anchor: '100%'
                            },
                            {
                                xtype: 'textfield',
                                fieldLabel: 'Type',
                                anchor: '100%'
                            },
                            {
                                xtype: 'textfield',
                                fieldLabel: 'Age',
                                anchor: '100%'
                            }
                        ]
                    },
                    {
                        xtype: 'fieldset',
                        title: 'Level1 Properties',
                        items: [
                            {
                                xtype: 'textfield',
                                fieldLabel: 'Sample1',
                                anchor: '100%'
                            },
                            {
                                xtype: 'checkboxfield',
                                fieldLabel: 'Recursive',
                           //     boxLabel: 'Box Label',
                                anchor: '100%'
                            },
                            {
                                xtype: 'checkboxfield',
                                fieldLabel: 'Delete',
                         //       boxLabel: 'Box Label',
                                anchor: '100%'
                            },
                            {
                                xtype: 'checkboxfield',
                                fieldLabel: 'Read Only',
                             //   boxLabel: 'Box Label',
                                anchor: '100%'
                            },
                            {
                                xtype: 'textfield',
                                fieldLabel: 'Include',
                                anchor: '100%'
                            },
                            {
                                xtype: 'textfield',
                                fieldLabel: 'Exclude',
                                anchor: '100%'
                            }
                        ]
                    },
                    {
                        xtype: 'fieldset',
                        title: 'Level2 Properties',
                        items: [
                            {
                                xtype: 'combobox',
                                fieldLabel: 'File B',
                                anchor: '100%'
                            }
                        ]
                    },
                    {
                        xtype: 'button',
                        text: 'Apply',
                        listeners: {
                            click: {
                                fn: me.onButtonClick,
                                scope: me
                            }
                        }
                    }
                ];
    		        me.callParent(arguments);
    		    },
    		    //Here do what you want to when click on Apply button
    		    onButtonClick: function(button, e, options) {
    				alert('Sample');
        		}
    }
    );

  2. #2
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    8,917
    Vote Rating
    443
    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  

    Default


    You want to apply the form like submit?
    http://docs.sencha.com/ext-js/4-1/#!....action.Submit

    Scott.

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