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