IDEMPIERE-2181 Not possible to get a value from a tab when in detail / tab context is sometimes "" instead of null - must check for that too
This commit is contained in:
parent
4b0793a6e2
commit
e27bff24d5
|
@ -575,7 +575,7 @@ public final class Env
|
||||||
if (TAB_INFO == TabNo)
|
if (TAB_INFO == TabNo)
|
||||||
return s != null ? s : "";
|
return s != null ? s : "";
|
||||||
//
|
//
|
||||||
if (s == null)
|
if (Util.isEmpty(s))
|
||||||
return getContext(ctx, WindowNo, context, false);
|
return getContext(ctx, WindowNo, context, false);
|
||||||
return s;
|
return s;
|
||||||
} // getContext
|
} // getContext
|
||||||
|
@ -617,7 +617,7 @@ public final class Env
|
||||||
if (TAB_INFO == TabNo)
|
if (TAB_INFO == TabNo)
|
||||||
return s != null ? s : "";
|
return s != null ? s : "";
|
||||||
//
|
//
|
||||||
if (s == null && ! onlyTab)
|
if (Util.isEmpty(s) && ! onlyTab)
|
||||||
return getContext(ctx, WindowNo, context, onlyWindow);
|
return getContext(ctx, WindowNo, context, onlyWindow);
|
||||||
return s;
|
return s;
|
||||||
} // getContext
|
} // getContext
|
||||||
|
@ -709,7 +709,7 @@ public final class Env
|
||||||
public static int getContextAsInt (Properties ctx, int WindowNo, int TabNo, String context)
|
public static int getContextAsInt (Properties ctx, int WindowNo, int TabNo, String context)
|
||||||
{
|
{
|
||||||
String s = getContext(ctx, WindowNo, TabNo, context);
|
String s = getContext(ctx, WindowNo, TabNo, context);
|
||||||
if (s.length() == 0)
|
if (Util.isEmpty(s))
|
||||||
return 0;
|
return 0;
|
||||||
//
|
//
|
||||||
try
|
try
|
||||||
|
|
Loading…
Reference in New Issue