zoukankan      html  css  js  c++  java
  • Ext.js form 表单提交问题

        var form = new Ext.form.FormPanel({
                labelAlign : 'right',
                border : false,
                bodyStyle : 'background-color: transparent;padding:5px',
                defaults : {
                    xtype : 'textfield',
                    anchor : '90%'
                },
                items : [{
                            name : 'rptId',
                            hidden : true
                        }, {
                            name :'parId',
                            hidden : true
                        },{
                            name : 'rptNm',
                            fieldLabel : '名称',
                            allowBlank : false
                        }, {
                            name : 'rptPath',
                            fieldLabel : '路径',
                            allowBlank : false,
                            xtype : 'textarea'
                        }, {
                            name : 'params',
                            width : 100,
                            fieldLabel : '参数',
                            xtype : 'multiCombo',
                            url : 'paramConfig!queryComboParams.action',
                            allowBlank : false
                        }, {
                            name : 'createAuth',
                            hidden : true
                        }, {
                            name : 'createDt',
                            hidden : true
                        }]
            });        
                
        var addCognosWin = new Ext.Window({
            title : '配置',
            width : 425,
            modal : true,
            closeAction : 'hide',
            items : form,
            buttons : [{
                        text : '提交',
                        handler : function() {
                        var node = tree1.getSelectionModel().getSelectedNodes()[0];
                        form.find('name','parId')[0].setValue(node.id);//此处不能用form.find('name','parId')[0].value = node.id;否则提交表单到后台不能获取到对象的parId值
                        console.log(form.find('name','parId')[0]);
                        BI.Util.submitForm({
                                    formPanel : form,
                                    url : 'cognosReport!addCognosReport.action',
                                    maskEl : addCognosWin.el,
                                    succ : function() {
                                        loadTree1();
                                        addCognosWin.hide();
                                    }
                                });
                        }
                    }, {
                        text : '取消',
                        handler : function() {
                            addCognosWin.hide();
                        }
                    }]
        });        
  • 相关阅读:
    sql2005事务的使用
    [原]using的另一种用法
    [原]Cache的简单用法
    [原] Js动态删除行(支持FireFox)
    [原]为什么文本框高度不一样?
    [原]如何把object解析为int,double,float?
    压缩SQL SERVER日志文件
    [原]替换的更新(Update)查询
    [原]让链接点击过后无虚线
    [原]取得Access表中表的名字
  • 原文地址:https://www.cnblogs.com/tanglc/p/3870339.html
Copyright © 2011-2022 走看看