(com.kingdee.bos.dao.IObjectValue) kdtPerson .getCell(rowIndex, \ \
kdtPerson.getCell(rowIndex, \ } }
关于对EASbos 分录设定默认值
kdtEntrys_detailPanel.addAddListener(
new com.kingdee.eas.framework.client.multiDetail.IDetailPanelListener() { public void beforeEvent(
com.kingdee.eas.framework.client.multiDetail.DetailPanelEvent event) throws Exception {
IObjectValuevo = event.getObjectValue(); vo.put(\
vo.put(\
void
} public
afterEvent(com.kingdee.eas.framework.client.multiDetail.DetailPanelEvent event) throws Exception { }
});
关于eas 单据中有多个分录的情况下,默认是哪个实现了排序
protectedKDTablegetDetailTable() { return kdtEntrys; }
关键就是看这个方法中的分录是那个分录,那个分录就默认实现了排序的工程。对于其他的,可以自己使用代码实现一个简单的排序
KDTSortManagersortManager = new KDTSortManager(kdtEntrys); sortManager.setSortAuto(true); sortManager.setClickCount(1);
for(inti = 0; i eas bos 客户端常用代码 public void onLoad() throws Exception { super.onLoad(); contname.setEnabled(false); contname.setVisible(true); KDTDefaultCellEditorworkArea_editor = (KDTDefaultCellEditor) kdtEntrys .getColumn(\ KDBizPromptBoxworkArea_prompt = (KDBizPromptBox) workArea_editor .getComponent(); workArea_prompt .setQueryInfo(\ KDTDefaultCellEditorprofessional_editor = (KDTDefaultCellEditor) kdtEntrys .getColumn(\ KDBizPromptBoxprofessional_prompt = (KDBizPromptBox) professional_editor .getComponent(); professional_prompt .setQueryInfo(\ KDTDefaultCellEditoroutPerson_editor = (KDTDefaultCellEditor) kdtEntrys .getColumn(\ KDBizPromptBoxoutPerson_prompt = (KDBizPromptBox) outPerson_editor .getComponent(); outPerson_prompt.setDisplayFormat(\outPerson_prompt.setEditFormat(\outPerson_prompt.setCommitFormat(\ kdtEntrys_detailPanel.setTitle(\外包人员信息\ CompUtil.setTitlePanelLength(kdtEntrys_detailPanel, 120); } protected void verifyInput(ActionEvent e) throws Exception { KDLabelContainer[] container = new KDLabelContainer[] { contcontractNum, } contsubUnit,contprojectItem}; STExceptionexc = STRequiredUtils.checkRequiredItem(container); if (STUtils.isNotNull(exc)) { super.handUIExceptionAndAbort(exc); } String[] columnNames = new String[] { \ STException exc2 = STRequiredUtils.checkEntryRequiredItem(kdtEntrys, columnNames); if (STUtils.isNotNull(exc2)) { super.handUIExceptionAndAbort(exc2); } super.verifyInput(e); 关于验证常用的几个类文件和代码 1 TrainVerifyUtils TrainVerifyUtils.verifyRepeatRow(this, kdtEntrys, \试题类型\ 2 TrainUtils TrainUtils.getSelectedValues(tblMain); 3 commonUtilFacade if (commonUtilFacade.checkColumnDup(\ editData.getNumber(), editData.getId())) { MsgBox.showInfo(this, EASResource.getString(RES, \ SysUtil.abort(); } 4 必录项检查 // 检查必填项调用代码 KDLabelContainer[] container = new KDLabelContainer[] { contNumber, conttitle,contsystem,contBizDate,contstartTime,contendTime,conttotalScore,conttotalTime,contstate }; STExceptionexc = STRequiredUtils.checkRequiredItem(container); if (STUtils.isNotNull(exc)) { super.handUIExceptionAndAbort(exc); } EAS多分录单据分录添加按钮,加到最左边 EAS多分录标准单据的分录操作按钮是在表格右上方的,有时由于业务需求,需要添加其它的操作按钮,以满足业务需求,可以先通过BOS设计工具,在UI上任一位置添加好所需要的代码,再通过如下代码,把按钮添加到多分录表头上。当你把指定的按钮添加到分录的按钮面板上后,UI上的自动就不显示了。 先定义好方法。 /** * 给分录上添加按钮,加到最左边 * * @author syj * @date 2009-7-8 * * @param table * @param button */ private void addButtonToHMDEntry(KDTable table, KDWorkButton button) { if (table.getParent() == null || table.getParent().getParent() == null) return; // 隐藏按钮 Component c = table.getParent().getParent(); if (c instanceofDetailPanel) { JPanel panel = (JPanel) c; JPanelcontrolPanel = null; // 获取controlPanel Component[] components = panel.getComponents(); for (inti = 0; i if (\ controlPanel = (KDPanel) component; } } // 获取btn if (controlPanel != null) { Rectangle rect = table.getBounds(); int x = rect.width - (button.getWidth() + 86 + 5); controlPanel.add(button, new com.kingdee.bos.ctrl.swing.KDLayout.Constraints(x, 5, button.getWidth(), 19, 9)); } } } 禁用EAS多分录单据分录上的操作按钮 EAS多分录标准单据的分录操作按钮是在表格右上方的,有时由于业务需求,这部分数据要自动生成,不充许操作,可能需要禁用或隐藏这些按钮,由于框架没有提供相应的接口,可以通过以下代码来实现 public static void disableHMDEntryButtons(KDTable table) { if (table.getParent() == null || table.getParent().getParent() == null) return; // 隐藏按钮 Component c = table.getParent().getParent(); if (c instanceofDetailPanel) { JPanel panel = (JPanel) c; JPanelcontrolPanel = null; // 获取controlPanel Component[] components = panel.getComponents(); for (inti = 0; i