From c23b924d2d7dc86d1af74501a9f1fe1d93046bbe Mon Sep 17 00:00:00 2001 From: Elaine Tan Date: Thu, 2 May 2013 17:51:12 +0800 Subject: [PATCH] IDEMPIERE-900 How To text vanishes after clicking on the Lookup icon --- .../webui/apps/form/WArchiveViewer.java | 2 ++ .../adempiere/webui/apps/form/WCharge.java | 1 + .../org/adempiere/webui/apps/form/WMatch.java | 1 + .../org/adempiere/webui/apps/form/WMerge.java | 4 ++- .../adempiere/webui/apps/form/WPayPrint.java | 2 ++ .../adempiere/webui/apps/form/WPaySelect.java | 2 ++ .../adempiere/webui/apps/form/WTreeBOM.java | 1 + .../webui/apps/form/WTreeMaintenance.java | 1 + .../webui/apps/form/WTrxMaterial.java | 1 + .../org/adempiere/webui/panel/InfoPanel.java | 35 +++++++++++++++++++ 10 files changed, 49 insertions(+), 1 deletion(-) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WArchiveViewer.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WArchiveViewer.java index 225fab1fce..f9895a5fde 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WArchiveViewer.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WArchiveViewer.java @@ -150,6 +150,8 @@ public class WArchiveViewer extends Archive implements IFormController, EventLis } }; + + m_WindowNo = form.getWindowNo(); } /** diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCharge.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCharge.java index 7e26cd357d..39d477556c 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCharge.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCharge.java @@ -178,6 +178,7 @@ public class WCharge extends Charge implements IFormController, EventListener, if (Window.MODE_EMBEDDED.equals(getAttribute(Window.MODE_KEY))) SessionManager.getAppDesktop().closeActiveWindow(); else + { + if (getWindowNo() > 0) + { + Object window = SessionManager.getAppDesktop().findWindow(getWindowNo()); + Component component = null; + if (window instanceof ADWindow) + { + ADWindow w = (ADWindow) window; + component = w.getADWindowContent().getComponent(); + } + else if (window instanceof ADForm || window instanceof ProcessDialog || window instanceof InfoPanel + || window instanceof WFPanel || window instanceof WTask) + { + component = (Component) window; + } + + if (component != null && + (component instanceof Vlayout || component instanceof ADForm || component instanceof ProcessDialog + || component instanceof InfoPanel || component instanceof Anchorlayout + || component instanceof WFPanel || component instanceof WTask)) + Events.sendEvent(new Event(WindowContainer.ON_WINDOW_CONTAINER_SELECTION_CHANGED_EVENT, component)); + else + SessionManager.getAppDesktop().updateHelpContext(X_AD_CtxHelp.CTXTYPE_Home, 0); + } + else + SessionManager.getAppDesktop().updateHelpContext(X_AD_CtxHelp.CTXTYPE_Home, 0); + this.detach(); + } } // dispose public void sort(Comparator cmpr, boolean ascending) {