How to achieve dialog with lookup control
How to create a dialog with the lookup as a control, the other control SalesId ItemId lookup is the only thing that SalesId.

Done as follows.
1.declare control by extended data type to use.
class LookupDialog extends RunBase
{
FormStringControl SalesIdCtrl, ItemIdCtrl;
}
2. Creation dialog.
protected Object dialog(Dialog dialog, boolean forceOnClient)
{
DialogRunBase ret;
;
ret = super(dialog, forceOnClient);
ret.caption('Costing report by order'); SalesIdCtrl = ret.formBuildDesign().addControl(FormControlType::String,'SalesId');
SalesIdCtrl.extendedDataType(extendedTypeNum('SalesId')); ItemIdCtrl = ret.formBuildDesign().addControl(FormControlType::String,'ItemId');
ItemIdCtrl.extendedDataType(extendedTypeNum('ItemId')); return ret;
}
3.Set the control can not override method at runtime.
public void dialogPostRun(DialogRunbase dialog)
{
;
super(dialog);
dialog.dialogForm().formRun().controlMethodOverload(true);
dialog.dialogForm().formRun().controlMethodOverloadObject(this);
SalesIdCtrl = dialog.dialogForm().formRun().design().controlName('SalesId');
ItemIdCtrl = dialog.dialogForm().formRun().design().controlName('ItemId');
}
4.Creating lookup method.
void ItemId_lookup()
{
Query query = new Query();
SysTableLookup sysTableLookup =
SysTableLookup::newParameters(tableNum(SalesLine), SalesIdCtrl);
;
sysTableLookup.addLookupField(fieldNum(SalesLine, ItemId));
sysTableLookup.addLookupField(fieldNum(SalesLine, Name));
query.addDataSource(tableNum(SalesLine)).addRange(fieldNum(SalesLine,SalesId)).value(SalesIdCtrl.text());
sysTableLookup.parmQuery(query);
sysTableLookup.performFormLookup();
}
5.Detailed method other
public container pack()
{
return conNull();
} public boolean unpack(container packedClass)
{
return true;
} static void main(Args _args)
{
LookupDialog test1 = new LookupDialog();
;
if (test1.prompt())
{
test1.run();
}
}
How to achieve dialog with lookup control的更多相关文章
- wx.Dialog
wx.Dialog A dialog box is a window with a title bar and sometimes a system menu, which can be moved ...
- [转]Angular 4|5 Material Dialog with Example
本文转自:https://www.techiediaries.com/angular-material-dialogs/ In this tutorial, we're going to learn ...
- A Complete ActiveX Web Control Tutorial
A Complete ActiveX Web Control Tutorial From: https://www.codeproject.com/Articles/14533/A-Complete- ...
- wx
wx The classes in this module are the most commonly used classes for wxPython, which is why they hav ...
- windows消息机制详解(转载)
消息,就是指Windows发出的一个通知,告诉应用程序某个事情发生了.例如,单击鼠标.改变窗口尺寸.按下键盘上的一个键都会使Windows发送一个消息给应用程序.消息本身是作为一个记录传递给应用程序的 ...
- Essential controls for web app
AUTO-COMPLETE/AUTO-SUGGEST Auto-complete using Vaadin Offer auto-suggest or auto-complete to help yo ...
- win7的优化-1:隐藏我的电脑导航栏里的收藏等项目
1. Type regedit in RUN or Start Menu search box and press Enter. It'll open Registry Editor. 2. Now ...
- devexpress13学习系列(一)PDFViewer(2)
DevExpress.XtraPdfViewer Namespace 该命名空间下,保留着pdfviewer组件需要的类,主要有: Class Description PdfCurrentPa ...
- Service Oriented Architecture
What is Service Oriented Architecture (SOA)? There have been so many interpretations of this through ...
随机推荐
- How to solve the SVDI SN Number Display Problem
Yesterday we have learn how to find the SVDI Serial Number, today one of customer from UK look our a ...
- 懒人福利:Xcode插件将JSON格式化输出为模型的属性->ESJsonFormat-Xcode
这是一个直接将json数据转换为模型数据的插件,只需要在控制台输入json数据,就可以在模型文件的.h文件中生成对应的模型数据 对于模型套模型的数据也做了处理,比较方便. 有需要的人可以尝试一下,但不 ...
- Sphinx 全文检索
什么是全文检索: 全文检索是指以文档的全部文本信息作为检索对象的一种信息检索技术.检索的对象有可能是文章的标题,也有可能是文章的作者,也有可能是文章摘要或内容. 简介: Sphinx是由俄罗斯人And ...
- C# struct
很困惑,为什么C#会有struct 这样一个关键字.虽然我用C#几年了,但绝少用到此关键字.我在相关书籍上学习C#的时候,看到过struct内容——但C#并不是我的第一入门语言,所以没有那么细致的学习 ...
- IOS 支付宝、微信回调传值给H5网页
这里用是的苹果原生和JS的交互 .有不明白JavaScriptCore框架的可以去网上搜索下这方面的资料很多废话不多说直接上代码 @protocol JSContextDelegate <JSE ...
- .NET DLL 保护措施详解(三)最终效果
针对.NET DLL 保护措施详解所述思路完成最终的实现,以下为程序包下载地址 下载 注意: 运行环境为.net4.0,需要安装VS2015 C++可发行组件包vc_redist.x86.exe.然后 ...
- hive操作语句使用详解
#创建表人信息表 person(String name,int age) hive> create table person(name STRING,age INT)ROW FORMAT DE ...
- WPF视频教程系列笔记
视频二:XAML基础 1.顶级元素 <Window></Window>,<Page></Page>,<Application></Ap ...
- jQuery简介<思维导图>
jQuery是继prototype之后有一个优秀的Javascript库,它由John Resig创建于2006年1月.它简化了遍历HTML文档.操作DOM.处理事件.执行动画和Ajax的操作.它独特 ...
- win7开启远程桌面
1.启用windows防火墙 计算机管理----->服务----->Windows Firewall(双击进入,启动类型改为自动,点击应用,点击启动)2.启动gpedit.msc打开“本地 ...