IDEMPIERE-685 Browser refresh on reports working wrong.

This commit is contained in:
Heng Sin Low 2013-03-21 15:23:02 +08:00
parent 4e038d62bb
commit a797c56caa
1 changed files with 7 additions and 3 deletions

View File

@ -174,6 +174,8 @@ public class ZkReportViewer extends Window implements EventListener<Event>, ITab
private A reportLink; private A reportLink;
private boolean init;
//private static final String REPORT = "org.idempiere.ui.report"; //private static final String REPORT = "org.idempiere.ui.report";
/** /**
@ -183,7 +185,7 @@ public class ZkReportViewer extends Window implements EventListener<Event>, ITab
public ZkReportViewer(ReportEngine re, String title) { public ZkReportViewer(ReportEngine re, String title) {
super(); super();
log.info(""); init = false;
m_WindowNo = SessionManager.getAppDesktop().registerWindow(this); m_WindowNo = SessionManager.getAppDesktop().registerWindow(this);
Env.setContext(re.getCtx(), m_WindowNo, "_WinInfo_IsReportViewer", "Y"); Env.setContext(re.getCtx(), m_WindowNo, "_WinInfo_IsReportViewer", "Y");
m_reportEngine = re; m_reportEngine = re;
@ -203,7 +205,7 @@ public class ZkReportViewer extends Window implements EventListener<Event>, ITab
@Override @Override
public void onPageAttached(Page newpage, Page oldpage) { public void onPageAttached(Page newpage, Page oldpage) {
super.onPageAttached(newpage, oldpage); super.onPageAttached(newpage, oldpage);
if (newpage != null) { if (newpage != null && !init) {
try try
{ {
m_ctx = m_reportEngine.getCtx(); m_ctx = m_reportEngine.getCtx();
@ -410,6 +412,8 @@ public class ZkReportViewer extends Window implements EventListener<Event>, ITab
} }
}); });
init = true;
} }
private void renderReport() throws Exception { private void renderReport() throws Exception {