From a797c56caacc36bb55c8cf82d10ad08f755f7c80 Mon Sep 17 00:00:00 2001 From: Heng Sin Low Date: Thu, 21 Mar 2013 15:23:02 +0800 Subject: [PATCH] IDEMPIERE-685 Browser refresh on reports working wrong. --- .../src/org/adempiere/webui/window/ZkReportViewer.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/ZkReportViewer.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/ZkReportViewer.java index 562209a456..3852b9a0f0 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/ZkReportViewer.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/ZkReportViewer.java @@ -173,6 +173,8 @@ public class ZkReportViewer extends Window implements EventListener, ITab private int mediaVersion = 0; private A reportLink; + + private boolean init; //private static final String REPORT = "org.idempiere.ui.report"; @@ -182,8 +184,8 @@ public class ZkReportViewer extends Window implements EventListener, ITab */ public ZkReportViewer(ReportEngine re, String title) { super(); - - log.info(""); + + init = false; m_WindowNo = SessionManager.getAppDesktop().registerWindow(this); Env.setContext(re.getCtx(), m_WindowNo, "_WinInfo_IsReportViewer", "Y"); m_reportEngine = re; @@ -203,7 +205,7 @@ public class ZkReportViewer extends Window implements EventListener, ITab @Override public void onPageAttached(Page newpage, Page oldpage) { super.onPageAttached(newpage, oldpage); - if (newpage != null) { + if (newpage != null && !init) { try { m_ctx = m_reportEngine.getCtx(); @@ -410,6 +412,8 @@ public class ZkReportViewer extends Window implements EventListener, ITab } }); + + init = true; } private void renderReport() throws Exception {