论坛首页 入门讨论版 EXT

ext2.0 表单提交到webwork的action

浏览 231 次
该帖已经被评为新手帖
作者 正文
最后更新时间:2008-05-20 关键字: ext2.0 表单提交到webwork的action
Ext.onReady(function(){

    Ext.QuickTips.init();
    // turn on validation errors beside the field globally
    Ext.form.Field.prototype.msgTarget = 'side';
    var bd = Ext.getBody();
   /*
     * ================   form  =======================
     */
    bd.createChild({tag: 'h2', html: 'Form 1 - Very Simple'});
    var simple = new Ext.FormPanel({
        labelWidth: 75,
        url:'customer.action',
        method:'POST',
        frame:true,
        title: 'Customer Regedit',
        bodyStyle:'padding:5px 5px 0',
        width: 350,
        defaults: {width: 230},
        defaultType: 'textfield',
       
  onSubmit: Ext.emptyFn,
  submit: function(){
  this.getEl().dom.submit();},
      
        items: [{
                fieldLabel: 'First Name',
                name: 'model.firstName',
                allowBlank:false
            },{
                fieldLabel: 'City',
                name: 'model.address.city'
            },{
                fieldLabel: 'Company',
                name: 'company'
            }, {
                fieldLabel: 'Email',
                name: 'email',
                vtype:'email'
            }, new Ext.form.TimeField({
                fieldLabel: 'Time',
                name: 'time',
                minValue: '8:00am',
                maxValue: '6:00pm'
            })
        ],

        buttons: [{text: 'submit',type:'submit'},{text: 'Cancel',type:'reset'}]
    });
    simple.render(document.body);
   // myForm.render(document.body);
});

以上代码不能提交到webwork的action,为什么?
   
最后更新时间:2008-05-20
url配置是针对ext的form的 而不是dom的,你调用dom.submit当然提交不了
   
0 请登录后投票
最后更新时间:2008-05-21
能给出具体的代码?刚刚接触ext2.0不是很了解. 感谢!
   
0 请登录后投票
最后更新时间:2008-05-21
yanweiqi 写道
能给出具体的代码?刚刚接触ext2.0不是很了解. 感谢!

沒有回答,自己解決了...........
   
0 请登录后投票
论坛首页 入门讨论版 EXT

跳转论坛:
JavaEye推荐