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]
                    });
}

在面板的扩展中,我配置了处理程序,用于将详细信息提交到 URL。

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

我在表单中添加了许多项目,包括那个按钮。但是在调用该onFileImport按钮处理函数时,我无法通过调用this.getForm()函数来获取表单。它显示以下错误。

Uncaught TypeError: this.getForm is not a function
4

0 回答 0