From 1d5b1541ddc583634d7222abc1b2fb57b54abf65 Mon Sep 17 00:00:00 2001 From: Heng Sin Low Date: Mon, 17 Jan 2011 20:02:20 +0800 Subject: [PATCH] Info panel not reset to empty after a new query doesn't match any records in db. --- .../org/adempiere/webui/panel/InfoPanel.java | 24 ++++++++++++------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoPanel.java index d3c2a86550..058c0ad897 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoPanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoPanel.java @@ -514,6 +514,19 @@ public abstract class InfoPanel extends Window implements EventListener, WTableM contentPanel.setData(model, null); } } + else + { + if (paging != null) + { + paging.setTotalSize(m_count); + paging.setActivePage(0); + pageNo = 0; + } + model = new ListModelTable(new ArrayList()); + model.setSorter(this); + model.addTableModelListener(this); + contentPanel.setData(model, null); + } int no = m_count; setStatusLine(Integer.toString(no) + " " + Msg.getMsg(Env.getCtx(), "SearchRows_EnterQuery"), false); setStatusDB(Integer.toString(no)); @@ -691,11 +704,6 @@ public abstract class InfoPanel extends Window implements EventListener, WTableM log.fine("#" + m_count + " - " + (System.currentTimeMillis()-start) + "ms"); - //Armen: add role checking (Patch #1694788 ) - //MRole role = MRole.getDefault(); - //if (role.isQueryMax(no)) - // return ADialog.ask(p_WindowNo, this, "InfoHighRecordCount", String.valueOf(no)); - return true; } // testCount @@ -1114,9 +1122,9 @@ public abstract class InfoPanel extends Window implements EventListener, WTableM header.setSortDirection("natural"); } } - executeQuery(); - renderItems(); - } + executeQuery(); + renderItems(); + } finally { hideBusyDialog();