首页 > 代码库 > edit界面初始化加默认值

edit界面初始化加默认值

功能名称:modelCreateAction

切入类型:after

事件名称:com.kingdee.bos.eventbus.event.model.ModelCreateEvent

 1 package com.kingdee.eas.re.sales.costadjust.handler;
 2 
 3 import java.util.Date;
 4 
 5 import com.kingdee.bos.BOSException;
 6 import com.kingdee.bos.eventbus.event.model.ModelCreateEvent;
 7 import com.kingdee.bos.webframework.dynamic.handler.model.WebModelCreateEventHandler;
 8 import com.kingdee.bos.webframework.exception.WafException;
 9 import com.kingdee.eas.fdc.sales.CostAdjustBillInfo;
10 import com.kingdee.eas.re.sales.web.utils.SalesContext;
11 /**
12  * 
13  * @author core_tuozq
14  * 初始化model
15  */
16 public class CostAdjustCreateEventHandler extends WebModelCreateEventHandler {
17     @Override
18     public void onModelCreate(ModelCreateEvent event) throws WafException,
19             BOSException {
20         // TODO Auto-generated method stub
21         CostAdjustBillInfo model = (CostAdjustBillInfo)event.getModel();
22         model.setPayinTime(new Date());
23         super.onModelCreate(event);
24     }
25 }

 

edit界面初始化加默认值