From 1ec538db0b5b4dffd62ae50c3753ed050ef2a52f Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Mon, 30 Jun 2014 12:07:47 -0500 Subject: [PATCH] IDEMPIERE-2028 Find not requerying if not changed --- .../src/org/compiere/model/GridTab.java | 32 ++----------------- 1 file changed, 2 insertions(+), 30 deletions(-) diff --git a/org.adempiere.base/src/org/compiere/model/GridTab.java b/org.adempiere.base/src/org/compiere/model/GridTab.java index 0b63eb3d4f..34b437e8f1 100644 --- a/org.adempiere.base/src/org/compiere/model/GridTab.java +++ b/org.adempiere.base/src/org/compiere/model/GridTab.java @@ -113,7 +113,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable /** * */ - private static final long serialVersionUID = -4152187193662318491L; + private static final long serialVersionUID = 1377113168185797983L; public static final String DEFAULT_STATUS_MESSAGE = "NavigateOrUpdate"; @@ -210,8 +210,6 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable private DataStatusEvent m_lastDataStatusEvent; - private String m_parsedWhere; - //Contains currently selected rows private ArrayList selection = null; @@ -626,10 +624,6 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable if (log.isLoggable(Level.FINE)) log.fine("#" + m_vo.TabNo + " - Only Current Rows=" + onlyCurrentRows + ", Days=" + onlyCurrentDays + ", Detail=" + isDetail()); - // is it same query? - boolean refresh = m_oldQuery.equals(m_query.getWhereClause()) - && m_vo.onlyCurrentRows == onlyCurrentRows && m_vo.onlyCurrentDays == onlyCurrentDays; - m_oldQuery = m_query.getWhereClause(); m_vo.onlyCurrentRows = onlyCurrentRows; m_vo.onlyCurrentDays = onlyCurrentDays; @@ -670,8 +664,6 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable } // Same link value? - if (refresh) - refresh = m_linkValue.equals(value); if (! m_linkValue.equals(value)) setQuery(null); m_linkValue = value; @@ -704,23 +696,6 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable m_extendedWhere = where.toString(); - if (m_extendedWhere.indexOf("@") > 1) - { - String s = Env.parseContext(Env.getCtx(), getWindowNo(), m_extendedWhere, false); - if (s != null) - { - if (!(s.equals(m_parsedWhere))) - { - refresh = false; - } - } - else - { - refresh = false; - } - m_parsedWhere = s; - } - // Final Query if (m_query.isActive()) { @@ -740,10 +715,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable if (log.isLoggable(Level.FINE)) log.fine("#" + m_vo.TabNo + " - " + where); if (m_mTable.isOpen()) { - if (refresh) - m_mTable.dataRefreshAll(); - else - m_mTable.dataRequery(where.toString(), m_vo.onlyCurrentRows && !isDetail(), onlyCurrentDays); + m_mTable.dataRequery(where.toString(), m_vo.onlyCurrentRows && !isDetail(), onlyCurrentDays); } else {