Info panel not reset to empty after a new query doesn't match any records in db.

This commit is contained in:
Heng Sin Low 2011-01-17 20:02:20 +08:00
parent 58ee1f6eda
commit 1d5b1541dd
1 changed files with 16 additions and 8 deletions

View File

@ -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<Object>());
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