From 6d33a6c7e3f1a4618c3faf7d0507a9bcc8dc3819 Mon Sep 17 00:00:00 2001 From: Heng Sin Low Date: Wed, 20 May 2009 03:42:46 +0000 Subject: [PATCH] added checking - can only show modal dialog in event listener --- .../src/org/adempiere/webui/component/Messagebox.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/zkwebui/WEB-INF/src/org/adempiere/webui/component/Messagebox.java b/zkwebui/WEB-INF/src/org/adempiere/webui/component/Messagebox.java index d12b6792b7..ce846e69a2 100644 --- a/zkwebui/WEB-INF/src/org/adempiere/webui/component/Messagebox.java +++ b/zkwebui/WEB-INF/src/org/adempiere/webui/component/Messagebox.java @@ -230,7 +230,10 @@ public class Messagebox extends Window implements EventListener this.setWidth("500px"); this.setPosition("center"); this.setClosable(true); - this.setAttribute(Window.MODE_KEY, Window.MODE_MODAL); + if (Events.inEventListener()) + this.setAttribute(Window.MODE_KEY, Window.MODE_MODAL); + else + this.setAttribute(Window.MODE_KEY, Window.MODE_HIGHLIGHTED); this.setSizable(true); this.setVisible(true);