练习-如何在同一窗口中设计/调用2个CreateLinesFrom按钮 [英] Adempiere - How to design/call 2 CreateLinesFrom button in Same window

查看:104
本文介绍了练习-如何在同一窗口中设计/调用2个CreateLinesFrom按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的自定义中,我想在WEBUI的同一窗口/表中创建2个 CreateLineFrom 表单.

In my customization i want to create 2 CreateLineFrom form in same window/Table in WEBUI.

通常,我们在Zkwebui中的WCreateFromFactory中调用我们的WClass文件(通过提供tableID和Class名称来静态)

Usually we call our WClass file in WCreateFromFactory (static by giving tableID and Class name) in Zkwebui

我的问题是如何在同一窗口中使用另一个"CreateLineFrom"表单?

My Question is how use another "CreateLineFrom" form in Same Window?

推荐答案

在adempiere中,由于哈希表存储了最后一个给定的值,因此无法在同一窗口中创建2个CLF表单 也就是说,当我执行它时,请调用"WCreateFrom2UI.class"

In adempiere functionality can't create 2 CLF form in Same Window because hashmap stored the last given value i.e when i execute it call the " WCreateFrom2UI.class"

private static HashMap<Integer, Class<? extends ICreateFrom>> registeredClasses = null;

static
{       
    s_registeredClasses.put(I_C_Order.Table_ID, WCreateFrom1UI.class);   
    s_registeredClasses.put(I_C_Order.Table_ID, WCreateFrom2UI.class);  
}

创建名为"CreateFromIM"的新按钮,在AbstractADwindowPanel中添加了操作,并创建了新类WCreateFromIMFactory,它是WCreateFromFactory的副本

Created New Button named as "CreateFromIM" ,added the action in AbstractADwindowPanel and created new Class WCreateFromIMFactory that is copy of WCreateFromFactory

    if (col.equals("CreateFrom")  ) {
        ICreateFrom cf = WCreateFromFactory.create(curTab);

    } 
    else if (col.equals("CreateFromIM") )  
        ICreateFrom cf = WCreateFromIMFactory.createIM(curTab);

        } 

这篇关于练习-如何在同一窗口中设计/调用2个CreateLinesFrom按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆