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. Go to the
zkwebui/WEB-INF/src/org/adempiere/webui/panel
folder of youradempiere_360
project and create anInfoMOMPanel
class, which extendsInfoPanel
class and implementsEventListener
interface. Make sure that the title is set toInfoMOM
.2. Add the following code block in the
createViewPanel()
method in theorg.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. 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....