Revert revision 12160 and implement a different approach as suggested by Heng Sin

[2790959] Document Date not updating Period as it did in Compiere
Link to SF Tracker: http://sourceforge.net/support/tracker.php?aid=2790959
This commit is contained in:
Carlos Ruiz 2010-05-04 17:08:50 +00:00
parent c8b861968c
commit d66b21d397
2 changed files with 1 additions and 24 deletions

View File

@ -200,29 +200,6 @@ public class CalloutEngine implements Callout
return m_mTab != null ? m_mTab.getActiveCallouts().length > 1 : false;
} // isCalloutActive
/**
* Is the current callout being called in the middle of
* another callout doing her works.
* Callout can use GridTab.getActiveCalloutInstance() method
* to find out callout for which field is running.
* @return true if active
*/
protected boolean isThisCalloutActive()
{
if (m_mTab == null)
return false;
//greater than 1 instead of 0 to discount this callout instance
String className = this.getClass().getName();
String methodName = Thread.currentThread().getStackTrace()[2].getMethodName();
String calloutName = className + "." + methodName;
int cnt = 0;
for (String activeCallouts : m_mTab.getActiveCallouts()) {
if (activeCallouts.equals(calloutName))
cnt++;
}
return cnt > 1;
} // isCalloutActive
/**
* Set Callout (in)active.
* Depreciated as the implementation is not thread safe and

View File

@ -49,7 +49,7 @@ public class CalloutGLJournal extends CalloutEngine
public String period (Properties ctx, int WindowNo, GridTab mTab, GridField mField, Object value)
{
String colName = mField.getColumnName();
if (value == null || isThisCalloutActive())
if (value == null)
return "";
int AD_Client_ID = Env.getContextAsInt(ctx, WindowNo, "AD_Client_ID");