- 1、本文档共18页,可阅读全部内容。
- 2、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
4.3典型的UI Coding
典型的UI Coding
列表界面常用代码
tblMain 作为框架为list列表界面中的kdTable绑定的变量,通过它可以访问到列表上的每一行、每一列,可以做数据检查,控制,格式化,行合并等操作
初始化用户自己定义的查询对话框,如果采用的是系统通用对话框则不需要实现下面的方法
protected CommonQueryDialog initCommonQueryDialog() {
dialog = super.initCommonQueryDialog();
try {
dialog.addUserPanel(getUserPanel());
dialog.setShowFilter(true);
dialog.setShowSorter(true);
dialog.setHeight(380);
dialog.setWidth(500);
dialog.setTitle(‘客户自定义过滤框’);
} catch (Exception e) {
handUIException(e);
}
return dialog;
}
protected CustomerQueryPanel getUserPanel() throws Exception {
if (this.userPanel == null)
this.userPanel = new PurOrderQueryUI();
userPanel.onLoad();
return this.userPanel;
}
设置列表界面的默认过滤条件,可用来过滤列表数据, 也可以直接设置 mainQuery的值实现过滤
protected EntityViewInfo getInitDefaultSolution() {
EntityViewInfo ev = new EntityViewInfo();
OtherBillQueryUI queryUI = null;
try {
queryUI = new PurOrderQueryUI();
queryUI.onLoad();
} catch (Exception e) {
handUIException(e);
}
ev.setFilter(queryUI.getFilterInfo());
return ev;
}
设置是否在调入列表界面之前先出过滤框
protected boolean initDefaultFilter()
{
return true;
}
客户端对审核的操作
public void actionAuditing_actionPerformed(ActionEvent e) throws Exception
{
//检查单据状态
if (!checkStatus(tblMain, BillStatusEnum.SUBMITED))
{
MsgBox.showInfo(this, Day4Resource.getStrResource(isNotSubmitStatus));
SysUtil.abort();
}
IPurOrder purorder = (IPurOrder) getBizInterface();
String[] billIdlist = getSelectedListId();
//常用的弹出对话框方法
int i = MsgBox.showConfirm2(this, sureAudit);
if (i == MsgBox.OK)
{
//审核操作
purOrder.audit(new ObjectStringPK(bill));
//完成其他业务逻控制
// 刷新列表界面
actionRefresh_actionPerformed(null);
}
}
关联生成
public void actionCreateTo_actionPerformed(ActionEvent e) throws Exception {
checkSelected();
// 未审核单据不能关联生成
if (!checkStatus(tblMain, BillStatusEnum.AUDITED)) {
MsgBox.showInfo(this, billIsUnAudited);
SysUtil.abort();
}
//有系统调用配置好的‘botp’规则
super.actionCreateTo_actionPerformed
文档评论(0)