Lines Tab read only on new doc after completing

Link to SF Tracker: http://sourceforge.net/support/tracker.php?aid=3033485
globalqss -> Integrating fix for annoying bug from http://adempiere.svn.sourceforge.net/viewvc/adempiere?view=revision&revision=13343
This commit is contained in:
teo_sarca 2011-02-27 00:29:18 -05:00
parent c58e6f00c0
commit 45200670fb
2 changed files with 26 additions and 0 deletions

View File

@ -613,6 +613,8 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
{
if (!m_loadComplete) initTab(false);
Env.clearTabContext(m_vo.ctx, m_vo.WindowNo, m_vo.TabNo);
log.fine("#" + m_vo.TabNo
+ " - Only Current Rows=" + onlyCurrentRows
+ ", Days=" + onlyCurrentDays + ", Detail=" + isDetail());

View File

@ -1210,6 +1210,30 @@ public final class Env
}
} // clearWinContext
/**
* Clean up context for Window Tab (i.e. delete it).
* Please note that this method is not clearing the tab info context (i.e. _TabInfo).
* @param ctx context
* @param WindowNo window
* @param TabNo tab
*/
public static void clearTabContext(Properties ctx, int WindowNo, int TabNo)
{
if (ctx == null)
throw new IllegalArgumentException ("Require Context");
//
Object[] keys = ctx.keySet().toArray();
for (int i = 0; i < keys.length; i++)
{
String tag = keys[i].toString();
if (tag.startsWith(WindowNo+"|"+TabNo+"|")
&& !tag.startsWith(WindowNo+"|"+TabNo+"|_TabInfo"))
{
ctx.remove(keys[i]);
}
}
}
/**
* Clean up all context (i.e. delete it)
* @param ctx context