0
Gts.app.report.chargesLog.SearchPanel = function(config) {  

    *****My Form Items Declarations*****

    this.btnPDF = new Ext.Button({
            iconCls : "pdf-button",
            tooltip : "Export To PDF",
            minWidth : 20,
            handler : this.onFileImport.createDelegate(this, ["PDF"]),
            colspan : 9,
            style : 'margin-left:640px',
            scope : this
            });

    Gts.app.report.chargesLog.SearchPanel.superclass.constructor.call(
                this, {
                    height : 99,
                    border : false,
                    frame : true,
                    region : "north",
                    id : 'searchPanel',
                    layout : "table",
                    layoutConfig : {
                        columns : 11
                    },
                    defaults : {
                        xtype : "panel",
                        layout : "form",
                        border : false,
                        labelWidth : 63,
                        bodyStyle : "padding-right:5px;padding-left:3px;padding-top:3px"
                    },
                    items : [**** My Form Items ****,this.btnPDF]
                    });
}

In the extend of the panel, I am configured the handler, which is to be used to submit the details to a URL.

Ext.extend(Gts.app.report.chargesLog.SearchPanel, Ext.Panel, {
    onFileImport : function(exportType) {
            var form = this.getForm();
    }
})

I have added many items to form including that button. But while calling that onFileImport button handler function, I cannot get the form by calling this.getForm() function. It is showing the below error.

Uncaught TypeError: this.getForm is not a function
Sajeer Babu
  • 1,103
  • 1
  • 9
  • 13

0 Answers0