diff --git a/org.adempiere.base/src/org/compiere/model/GridTab.java b/org.adempiere.base/src/org/compiere/model/GridTab.java index 06c7a51c79..98f4c11d37 100644 --- a/org.adempiere.base/src/org/compiere/model/GridTab.java +++ b/org.adempiere.base/src/org/compiere/model/GridTab.java @@ -112,7 +112,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable /** * */ - private static final long serialVersionUID = 5086068543834849233L; + private static final long serialVersionUID = 6119615577891555600L; public static final String DEFAULT_STATUS_MESSAGE = "NavigateOrUpdate"; @@ -2854,6 +2854,9 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable private boolean m_updateWindowContext = true; + // Cached parent Tab No + private int m_parentTabNo = -1; + /** * * @return list of active call out for this tab @@ -3323,11 +3326,13 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable */ private int getParentTabNo() { + if (m_parentTabNo >= 0) + return m_parentTabNo; int tabNo = m_vo.TabNo; int currentLevel = m_vo.TabLevel; int parentLevel = currentLevel-1; if (parentLevel < 0) - return tabNo; + return (m_parentTabNo = tabNo); while (parentLevel != currentLevel) { tabNo--; @@ -3335,7 +3340,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable if (tabNo == 0) break; } - return tabNo; + return (m_parentTabNo = tabNo); } public GridTab getParentTab()