重置按钮

	this.getForm().reset();
		if(this.updateFlag) {
			var promotionExamPanel = Ext.getCmp('promotionExamPanel');
			var sm = promotionExamPanel.grid.getSelectionModel(),record = sm.getSelected();
			promotionTypeCheckboxGroup.reset();
			this.form.loadRecord(record);
			var vals = record.data.promotion_scope.split(",");
			promotionTypeCheckboxGroup.items.each(function(item){
	        	for (var i = 0,length= vals.length;i<length;i++ ){
	        		if(vals[i]==item.inputValue){
	        			 item.setValue(true);
	        		}
	        	}
		    });
		}else {//新增
			this.getForm().setValues({
				'exam_type': 1,
				'exam_status': 0
			});
		}

猜你喜欢

转载自zhihchen.iteye.com/blog/1780207