对于单据单分录,如果我们想对某行数据在增加时或删除时做处理,直接用框架提供的事件即可,但对于多分录目前框架无法直接处理,需要我们自己在代码中来处理,具体例子如下:
/**
* output package name
*/
package com.kingdee.eas.huar.projectmgr.client;
...
/**
* output class name
*/
public class PrjEstimateEditUI extends AbstractPrjEstimateEditUI implements IDetailPanelListener {
private static final Logger logger = CoreUIObject.getLogger(PrjEstimateEditUI.class);
...
/**
* output class constructor
*/
public PrjEstimateEditUI() throws Exception {
super();
}
protected void initListener() {
super.initListener();
Container pnlPlaceCirc = kdtPlaceCircs.getParent().getParent();
if (pnlPlaceCirc instanceof DetailPanel) {
DetailPanel detailPanel = (DetailPanel) pnlPlaceCirc;
detailPanel.addAddListener(this);
detailPanel.addInsertListener(this);
}
cmbxMakeMethod.addItemListener(new ItemListener() {
public void itemStateChanged(ItemEvent e) {
if (e.getStateChange() == ItemEvent.SELECTED) {
boolean enabled = e.getItem() == RentCalcMethodEnum.pressAndEngineFixedRent;
txtNomMonthRate.setEnabled(enabled);
}
}
});
}
public void beforeEvent(DetailPanelEvent e) throws Exception {
PrjEstimatePlaceCircInfo prjEstimatePlaceCirc = (PrjEstimatePlaceCircInfo) e.getObjectValue();
prjEstimatePlaceCirc.setCurrency(currency);
prjEstimatePlaceCirc.setCreator(SysContext.getSysContext().getCurrentUserInfo().getPerson());
prjEstimatePlaceCirc.setCreateTime(new Date());
}
public void afterEvent(DetailPanelEvent e) throws Exception {
// TODO 自动生成方法存根
}
}
2228

被折叠的 条评论
为什么被折叠?



