diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/WArchive.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/WArchive.java index 6fe382662f..b2a9d0d1bb 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/WArchive.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/WArchive.java @@ -133,7 +133,7 @@ public class WArchive implements EventListener if (allReports > 0) { m_reportsAll = new Menuitem(Msg.getMsg(Env.getCtx(), "ArchivedReportsAll") - + " (" + reportCount + ")"); + + " (" + allReports + ")"); m_reportsAll.addEventListener(Events.ON_CLICK, this); m_popup.appendChild(m_reportsAll); } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WArchiveViewer.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WArchiveViewer.java index 90ff3c91b4..e81a27ca52 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WArchiveViewer.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WArchiveViewer.java @@ -64,6 +64,7 @@ import org.compiere.util.KeyNamePair; import org.compiere.util.Msg; import org.compiere.util.Util; import org.zkoss.util.media.AMedia; +import org.zkoss.zk.ui.Page; import org.zkoss.zk.ui.event.Event; import org.zkoss.zk.ui.event.EventListener; import org.zkoss.zk.ui.event.Events; @@ -133,15 +134,25 @@ public class WArchiveViewer extends Archive implements IFormController, EventLis { log.info(""); - form = new CustomForm(); - try { - dynInit(); - jbInit(); - } - catch(Exception e) - { - log.log(Level.SEVERE, "init", e); - } + form = new CustomForm() { + private static final long serialVersionUID = 7226661630651936293L; + + @Override + public void onPageAttached(Page newpage, Page oldpage) { + super.onPageAttached(newpage, oldpage); + if (newpage != null) + try { + dynInit(); + jbInit(); + } + catch(Exception e) + { + log.log(Level.SEVERE, "init", e); + } + + } + + }; m_WindowNo = form.getWindowNo(); } @@ -511,6 +522,9 @@ public class WArchiveViewer extends Archive implements IFormController, EventLis */ private void updateQDisplay() { + if (!showQuery) + return; + boolean reports = reportField.isChecked(); if (log.isLoggable(Level.CONFIG)) log.config("Reports=" + reports);