IDEMPIERE-5104 MLookup: Inconsistent use of TabNo (#1057)
This commit is contained in:
parent
cafe018404
commit
160db45e84
|
@ -71,6 +71,7 @@ public final class MLookup extends Lookup implements Serializable
|
|||
{
|
||||
super(info.DisplayType, info.WindowNo);
|
||||
m_info = info;
|
||||
m_tabNo = TabNo;
|
||||
if (log.isLoggable(Level.FINE)) log.fine(m_info.KeyColumn);
|
||||
|
||||
// load into local lookup, if already cached
|
||||
|
@ -105,6 +106,8 @@ public final class MLookup extends Lookup implements Serializable
|
|||
/** The Lookup Info Value Object */
|
||||
private MLookupInfo m_info = null;
|
||||
|
||||
private int m_tabNo = 0;
|
||||
|
||||
/** Storage of data Key-NamePair */
|
||||
private volatile LinkedHashMap<Object,Object> m_lookup = new LinkedHashMap<Object,Object>();
|
||||
/** The Data Loader */
|
||||
|
@ -888,7 +891,7 @@ public final class MLookup extends Lookup implements Serializable
|
|||
{
|
||||
if (info.IsValidated) return true;
|
||||
if (info.ValidationCode.length() == 0) return true;
|
||||
String validation = Env.parseContext(m_info.ctx, m_info.WindowNo, m_info.ValidationCode, false);
|
||||
String validation = Env.parseContext(m_info.ctx, m_info.WindowNo, m_tabNo, m_info.ValidationCode, false);
|
||||
if (validation.equals(info.parsedValidationCode)) return true;
|
||||
return false;
|
||||
}
|
||||
|
@ -1007,7 +1010,7 @@ public final class MLookup extends Lookup implements Serializable
|
|||
// not validated
|
||||
if (!m_info.IsValidated)
|
||||
{
|
||||
String validation = Env.parseContext(m_info.ctx, m_info.WindowNo, m_info.tabNo, m_info.ValidationCode, false);
|
||||
String validation = Env.parseContext(m_info.ctx, m_info.WindowNo, m_tabNo, m_info.ValidationCode, false);
|
||||
m_info.parsedValidationCode = validation;
|
||||
if (validation.length() == 0 && m_info.ValidationCode.length() > 0)
|
||||
{
|
||||
|
|
|
@ -1545,7 +1545,7 @@ public final class Env
|
|||
* @param WindowNo Number of Window
|
||||
* @param tabNo Number of Tab
|
||||
* @param value Message to be parsed
|
||||
* @param onlyTab if true, no defaults are used
|
||||
* @param onlyTab if true, only value from tabNo are used
|
||||
* @param ignoreUnparsable if true, unsuccessful @return parsed String or "" if not successful and ignoreUnparsable
|
||||
* @return parsed context
|
||||
*/
|
||||
|
@ -1629,15 +1629,15 @@ public final class Env
|
|||
*
|
||||
* @param ctx context
|
||||
* @param WindowNo Number of Window
|
||||
* @param TabNo Number of Tab
|
||||
* @param tabNo Number of Tab
|
||||
* @param value Message to be parsed
|
||||
* @param onlyWindow if true, no defaults are used
|
||||
* @param onlyTab if true, no value from tabNo are used
|
||||
* @return parsed String or "" if not successful
|
||||
*/
|
||||
public static String parseContext (Properties ctx, int WindowNo, int tabNo, String value,
|
||||
boolean onlyWindow)
|
||||
boolean onlyTab)
|
||||
{
|
||||
return parseContext(ctx, WindowNo, tabNo, value, onlyWindow, false);
|
||||
return parseContext(ctx, WindowNo, tabNo, value, onlyTab, false);
|
||||
} // parseContext
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue