ExtJs formGrid submit

if(aqf.form.isValid()){
	aqf.form.doAction('submit',{   //这里估计要修改
	url:contextPath+'/xg/pypx/pypxYxjhAction.do?method=addPypxYxjh',
	method:'post',
	waitTitle:'提示信息',                                                    
	waitMsg:'数据更新中,请稍候...',
	success:function(form,action)
	if(action.result.success){
		aqf.form.reset();
		dataStore.reload();
		addYxjhWin.hide();
										}
	},failure:function(form, action){
		switch (action.failureType) {  
			case Ext.form.Action.CLIENT_INVALID:  
			   	Ext.Msg.alert("添加失败", "提交的表单数据无效,请检查!");  
			  	break;  
			case Ext.form.Action.CONNECT_FAILURE:  
				Ext.Msg.alert('添加失败', '连接失败');  
				break;  
			case Ext.form.Action.SERVER_INVALID:  
				Ext.Msg.alert('添加失败', action.result.message);  
		}  
	}
	});

listeners:{
	'activate':fprscx2
},



								var fprs = Ext.getCmp('_fprs').getValue();
								var dqfprs = Ext.getCmp('_dqfprs').getValue();
								var yfprs = fprs.substring(0, fprs.lastIndexOf("/"));
								var qxpxrs = fprs.substring(fprs.lastIndexOf("/")+1);
								var dfprs = eval(qxpxrs - yfprs);
								if(eval(dqfprs - dfprs) > 0){
									Ext.Msg.alert('提示信息',"超出项目设定的评选人数!");
									return;
								}

你可能感兴趣的:(ExtJs formGrid submit)