public class SupplierEditUICTEx extends SupplierEditUI { public SupplierEditUICTEx() throws Exception { super(); } @Override protected void initCompanyUI() throws Exception { super.initCompanyUI(); // 初始化財務資料頁籤後,給財務頁籤中的銀行信息表格,增長事件 if (!(currentUI instanceof SupplierCompanyUI)) { return; } SupplierCompanyUI ui = (SupplierCompanyUI) currentUI; ui.tblBank.addKDTEditListener(new com.kingdee.bos.ctrl.kdf.table.event.KDTEditAdapter() { public void editStopped(com.kingdee.bos.ctrl.kdf.table.event.KDTEditEvent e) { try { tblBank_editStopped(e); } catch (Exception exc) { handUIException(exc); } } }); } protected void tblBank_editStopped(KDTEditEvent e) { if (ObjectUtils.isEquals(e.getOldValue(), e.getValue())) { return; } int editColIndex = e.getColIndex(); int editRowIndex = e.getRowIndex(); KDTable tblBank = (KDTable) e.getSource(); // String colName = tblBank.getColumnKey(editColIndex); IRow editRow = tblBank.getRow(editRowIndex); // 銀行名稱切換 if (e.getValue() instanceof BEBankInfo) { BEBankInfo beBank = (BEBankInfo) e.getValue(); ICell cell = editRow.getCell("cnapscode"); if (cell != null) { // 行名行號 cell.setValue(beBank.getNumber()); } // 銀行地址 editRow.getCell("bankAddress").setValue(beBank.getAdress()); } } }