金蝶EAS—BOS 开发经验原创
金蝶云社区-飞天
飞天
8人赞赏了该文章 1,870次浏览 未经作者许可,禁止转载编辑于2020年11月17日 10:03:46
summary-icon摘要由AI智能服务提供

这段文本涵盖了多个与软件开发相关的主题,包括界面设计、数据库查询、UI构建、问题排查、代码调试及优化技巧。简要概述如下: 文本介绍了建模视图和设计视图的作用,红色停止按钮的行为,SQL查询及代码示例,UI开发中遇到的问题及解决方法,如新增发票列表关闭按钮无效、UI控件绑定action方法缺失、添加页签等。还提到了Eclipse调试技巧、比过滤器更快的查询方式、必填项外观设置、PL/SQL执行快捷键、表中外键表示、SQL错误处理、UI刷新、列锁定、行与列选中、行号获取、单击事件添加、F7选择框初始化及配置等实用技巧和知识。

1.建模视图,用来生成表

2.设计视图,用来设计视图

3.红色停止按下只停止客户端端,不停止服务器端,要进行选择才可以关闭服务器端

3.如果要写sql,在facade→ui→需要选择的模块中,invoiceFacede中选择对应的ControllerBean.java 覆盖生成的方法。

只在一个表

EntityViewInfo entityViewInfo = new EntityViewInfo();
   FilterInfo filterInfo = new FilterInfo();
   filterInfo.getFilterItems().add(new FilterItemInfo("number",reportNo,CompareType.EQUALS));
   entityViewInfo.setFilter(filterInfo);

CptDxbCollection cptDxbCollection = CptDxbFactory.getRemoteInstance().getCptDxbCollection(entityViewInfo);//根据单据号获得主合同
    CptDxbInfo cptDxbInfo = cptDxbCollection.get(0);//如果只有一个返回结果则用这种,否则用for循环出结果。

··························································································································································

 4.今天做开发遇到一个问题,点新增发票后退出新增发票发票列表关闭按钮不管用,原因是:

map.put("reportNumber", reportNumber);
map.put("student", studentInfoInfo);
IUIWindow uiWindow = null;
uiWindow = UIFactory.createUIFactory(UIFactoryName.MODEL).create(
destBillEditUIClassName, map, null, OprtState.ADDNEW);


// 开始展现 UI
uiWindow.show();

少加了中间红色标号一句,因为父类有uiWindow这个变量,所以也不会报错,注意注意~~

··························································································································································

5.今天遇到一个问题,建立UI后发布,然后在对应的java文件中找不到绑定的action方法

解决办法:原因是已创建过的UI再加上控件需要重写父类的方法,但是新UI加上控件后会自动覆盖父类方法

······························································································································································································

6.添加页签:KDTabbedPane→KDPanel

··························································································································································

7.当eclipse调试时不单步跳跃时不妨重启一下

··························································································································································

8.今天得知一种比过滤器更快的查询方式(2013-04-26)

student = StudentInfoFactory.getRemoteInstance().getStudentInfoInfo(new ObjectUuidPK(studentFid));

通过student的属性对student进行查询,因为id是唯一属性,所以可以获得唯一的Id

··························································································································································

9.必填项外观为黄色只需设置required属性为true

··························································································································································

10.PL/SQL SQL执行快捷键F8,并且要在SQLWindow下执行 2013-04-27

··························································································································································

11.UI中的表中属性是F7意思是其他表的外键

··························································································································································

12.sql没有拼错,能直接放到oracle中运行,但是程序报sql错误。

原因:在sql的最前面应该加一个/*dialect*/ (查资料显示金蝶执行原生sql:

在sql的前面加上“*dialect*”即可,例如:"*dialect*select fid from t_bd_currency")

··························································································································································

13.发布UI以后运行软件但是UI没有变

原因:刷新下java源代码在eclipse中

·······················································································································································

14.表格某列不能修改只需在列的lock属性定义为true

············································································································································

15.行选中与列选中

this.kdtReportList.getSelectManager().setSelectMode(KDTSelectManager.ROW_SELECT);// 报班单列表行选中
this.kdtCourse.getSelectManager().setSelectMode(KDTSelectManager.ROW_SELECT);// 课程列表列表行选中

············································································································································

16.确定行号

int selectItem = reportView.kdtSubCourse.getSelectManager().getActiveRowIndex();

············································································································································

17.添加单击事件在onload方法里

public void onLoad() throws Exception {
super.onLoad();
this.kDTable1.addKDTMouseListener(new KDTMouseListener() { 
public void tableClicked(KDTMouseEvent e) {  
try { 
if (e.getClickCount() == 1 || e.getClickCount() == 2) { //单击或者双击


} catch (Exception e2) { 
e2.printStackTrace(); 

}



});//给大小班单据添加单击事件
}

············································································································································

18.初始化F7

KDBizPromptBox productDxbPromptBox = new KDBizPromptBox();
productDxbPromptBox.setQueryInfo("com.kingdee.eas.erp_v3.bussmodel.v3course.app.CourComdityDxbQuery");
productDxbPromptBox.setVisible(true);
poductDxbPromptBox.setEditable(false);

productDxbPromptBox.setEnabled(false);
productDxbPromptBox.setDisplayFormat("$name$");//默认显示时的格式
productDxbPromptBox.setEditFormat("$name$");//编辑时的格式
productDxbPromptBox.setCommitFormat("$name$");//提交时的格式
ObjectValueRender kdtRender = new ObjectValueRender();//使表格中显示想要的属性

kdtRender.setFormat(new BizDataFormat("$name$"));r
this.kDTable1.getColumn("product").setRenderer(kdtRender); 
KDTDefaultCellEditor productDxbCellEditor = new KDTDefaultCellEditor(productDxbPromptBox);
this.kDTable1.getColumn("product").setEditor(productDxbCellEditor);

············································································································································

图标赞 8
8人点赞
还没有人点赞,快来当第一个点赞的人吧!
图标打赏
0人打赏
还没有人打赏,快来当第一个打赏的人吧!