可以直接在ui类里覆盖方法,然后添加功能代码,或者直接调用超类
public void actionCancelCancel_actionPerformed(ActionEvent e) throws Exception
{
super.actionCancelCancel_actionPerformed(e);
checkSelected();
//super.cancelCancel();
IIDList selectIDs = new RealModeIDList();
ArrayList ids = null;
ids = getSelectedIdValues();
String removeID = null;
IObjectPK pk;
for (int i = 0; i < ids.size(); ++i)
{
selectIDs.add((String)ids.get(i));
}
for (int i = 0;i<selectIDs.size();i++)
{
pk = new ObjectUuidPK(BOSUuid.read(selectIDs.getID(i)));
WaresInfo waresinfo = (WaresInfo) getBizInterface().getValue(pk);
String erroMesage ="";
if(waresinfo.getName()== null){
erroMesage += "名称不能为空!";
}
if(waresinfo.getNumber()==null){
erroMesage += "编码不能为空!";
}
if(waresinfo.getMaterialCode()==null){
erroMesage += "物料编码不能为空!";
}
if(waresinfo.getDeliverOrg()==null){
erroMesage += "发货组织不能为空!";
}
if(waresinfo.getDeliverWareHouse()==null){
erroMesage += "发货仓库不能为空!";
}
if(erroMesage != ""){
MsgBox.showError("选中的第"+(i+1)+"行:"+erroMesage);
break;
}else{
waresinfo.setDeletedStatus(DeletedStatusEnum.OPEN);
getBizInterface().save(waresinfo);
}
}
this.refresh(e);
}