Book Image

ADempiere 3.6 Cookbook

Book Image

ADempiere 3.6 Cookbook

Overview of this book

Table of Contents (16 chapters)
ADempiere 3.6 Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface

Creating a new info window for the web version


This recipe describes the steps applicable for the web version of ADempiere when it comes to creating a new info window.

How to do it...

  1. 1. Go to the zkwebui/WEB-INF/src/org/adempiere/webui/panel folder of your adempiere_360 project and create an InfoMOMPanel class, which extends InfoPanel class and implements EventListener interface. Make sure that the title is set to InfoMOM.

  2. 2. Add the following code block in the createViewPanel() method in the org.adempiere.webui.dashboard.DPViews.java class:

    if (MRole.getDefault().isAllow_Info_Mom())
    {
    ToolBarButton btnViewItem = new ToolBarButton("InfoMOM");
    btnViewItem.setLabel(Msg.getMsg(Env.getCtx(), "InfoMOM"));
    btnViewItem.addEventListener(Events.ON_CLICK, this);
    vbox.appendChild(btnViewItem);
    }
    
  3. 3. Add the new method in the org.adempiere.webui.panel.InfoPanel.java class:

    public static void showMOM(int WindowNo)
    {
    InfoPanel info = new InfoMOMPanel(WindowNo, "", false, "");
    AEnv.showWindow(info);
    }
    
  4. 4....