From 506bc2038f327744f1bfedb55f8c0ee23a08de2a Mon Sep 17 00:00:00 2001 From: Heng Sin Low Date: Fri, 18 Sep 2009 06:26:07 +0000 Subject: [PATCH] Search on empty window failing - ID: 2849453 --- .../src/org/adempiere/webui/panel/AbstractADWindowPanel.java | 2 -- .../WEB-INF/src/org/adempiere/webui/window/FindWindow.java | 5 +++++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/zkwebui/WEB-INF/src/org/adempiere/webui/panel/AbstractADWindowPanel.java b/zkwebui/WEB-INF/src/org/adempiere/webui/panel/AbstractADWindowPanel.java index 28100cc277..a0ff778908 100644 --- a/zkwebui/WEB-INF/src/org/adempiere/webui/panel/AbstractADWindowPanel.java +++ b/zkwebui/WEB-INF/src/org/adempiere/webui/panel/AbstractADWindowPanel.java @@ -1188,8 +1188,6 @@ public abstract class AbstractADWindowPanel extends AbstractUIPart implements To FindWindow find = new FindWindow (curTab.getWindowNo(), curTab.getName(), curTab.getAD_Table_ID(), curTab.getTableName(), curTab.getWhereExtended(), findFields, 1, curTab.getAD_Tab_ID()); - find.setVisible(true); - AEnv.showWindow(find); if (!find.isCancel()) { diff --git a/zkwebui/WEB-INF/src/org/adempiere/webui/window/FindWindow.java b/zkwebui/WEB-INF/src/org/adempiere/webui/window/FindWindow.java index 7c7b14a0a5..0ce6002710 100644 --- a/zkwebui/WEB-INF/src/org/adempiere/webui/window/FindWindow.java +++ b/zkwebui/WEB-INF/src/org/adempiere/webui/window/FindWindow.java @@ -33,6 +33,7 @@ import java.util.logging.Level; import java.util.regex.Pattern; import org.adempiere.webui.LayoutUtils; +import org.adempiere.webui.apps.AEnv; import org.adempiere.webui.component.Button; import org.adempiere.webui.component.Combobox; import org.adempiere.webui.component.Grid; @@ -211,6 +212,7 @@ public class FindWindow extends Window implements EventListener,ValueChangeListe if (m_total < minRecords) { + dispose(); return; } this.setBorder("normal"); @@ -220,6 +222,9 @@ public class FindWindow extends Window implements EventListener,ValueChangeListe this.setAttribute(Window.MODE_KEY, Window.MODE_MODAL); this.setClosable(false); this.setSizable(true); + + this.setVisible(true); + AEnv.showWindow(this); } /** * initialise lookup record tab