小编mas*_*ifi的帖子

在extjs上调用父类函数3

我有这样的extjs类添加:

    Ext.ns('Example');

Example.Form = Ext.extend(Ext.form.FormPanel, {

   ,initComponent:function() {
        // hard coded - cannot be changed from outsid
        var config = {
            items: [{
            xtype: 'textfield',
            fieldLabel: 'title',
            name: 'author',
            allowBlank: false
          }

         .........................

    ]
            ,buttons:[
                {
                    text:'submit'
                    ,formBind:true
                    ,scope:this
                    ,handler:this.submit
            }]
        }; // eo config object

        // apply config
        Ext.apply(this, Ext.apply(this.initialConfig, config));

        // call parent
        Example.Form.superclass.initComponent.apply(this, arguments);
    } // eo function initComponent
    /**
    * Form onRender override
    */
    ,onRender:function() {
        ..................
    } // eo function onRender
    /**
    * Reset
    */ …
Run Code Online (Sandbox Code Playgroud)

class function parent extjs3

2
推荐指数
1
解决办法
6251
查看次数

在提交操作extjs上更改表单字段值

我有这样的extjs形式:

        {
            xtype : 'textfield',
            fieldLabel : 'name',
            name : 'vTitle',
            allowBlank : false
        },{
            xtype : 'datefield',
            fieldLabel : 'name',
            name : 'date',
            allowBlank : false
        }
Run Code Online (Sandbox Code Playgroud)

当我提交表单值时,将其发送到服务器,如下所示:

Parameters:
 vTitle:mm
 date:9/11/2011
Run Code Online (Sandbox Code Playgroud)

提交表单时,我希望发送自己的值而不是默认值。例如,当我提交日期:9/11/2011我想要日期:my value related with 9/11/2011发送到服务器。

我在表单中使用了setvalue,但是如果服务器出现错误,我会更改默认表单值并且不希望使用setvalue(仅将自己的值发送到服务器)

extjs form-submit extjs3

0
推荐指数
1
解决办法
3132
查看次数

标签 统计

extjs3 ×2

class ×1

extjs ×1

form-submit ×1

function ×1

parent ×1