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:
Carlos Ruiz 2015-05-26 17:47:09 -05:00
parent 4b0793a6e2
commit e27bff24d5
1 changed files with 3 additions and 3 deletions

View File

@ -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