1. #1
    Sencha User
    Join Date
    Jul 2012
    Posts
    45
    Vote Rating
    0
    maxkliver is on a distinguished road

      0  

    Default How to submit data from Ext.FormPanel with tabs?

    How to submit data from Ext.FormPanel with tabs?


    There are several tabs on a FormPanel:saving with fp tabs.jpg

    Code:

    Code:
        var podform = new Ext.FormPanel({
         labelAlign: 'left',
         id: 'tab_6',
         frame:true,
         title: 'Договоры подряда',
         bodyStyle:'padding:5px 5px 0',
         width: 600,
         listeners: {
        'activate' :  function(podform,records,options) {
               console.log("store:"+store_form);
            this.loaded = true;
            var record = store_form.getAt(0);
            podform.getForm().loadRecord(record);
        }
         },
         reader : new Ext.data.XmlReader({
        record : 'zem',
        //      success: '@success'
        }, [
          ]),
         items: []
        });
       podform.add(tabs_pod);
    Now i try submit data to server:

    Code:
    podform.addButton({
            text: 'Submit',
            //disabled:true,
            handler: function(){
                podform.getForm().submit({
                    url:url_servlet+'submit.jsp',
                    waitMsg:'Saving Data...',
                    success: function(form, action) {
                        Ext.Msg.show({
                         title:'Success'
                        ,msg:'Form submitted successfully'
                        ,modal:true
                            ,icon:Ext.Msg.INFO
                        ,buttons:Ext.Msg.OK
                        });
                    }
                });
            }
        });
    But firebug says that i subbmit data only with panels that I have seen. Its means if i not click on second tab i cant get data from it.
    Its possible to fix it?

  2. #2

  3. #3

  4. #4
    Sencha User
    Join Date
    Jul 2012
    Posts
    45
    Vote Rating
    0
    maxkliver is on a distinguished road

      0  

    Default


    When i use deferredRender:false, first tab shows normal but another tabs looks like this:
    Attached Images

  5. #5
    Sencha User
    Join Date
    Jan 2011
    Posts
    549
    Vote Rating
    54
    willigogs is a jewel in the rough willigogs is a jewel in the rough willigogs is a jewel in the rough

      0  

    Default


    Try setting your hideMode config to 'offsets', and if this doesn't work, perhaps layoutOnTabChange: true

    http://docs.sencha.com/ext-js/3-4/#!...l-cfg-hideMode
    http://docs.sencha.com/ext-js/3-4/#!...outOnTabChange

Thread Participants: 1