From e27bff24d53c8740520044c79e7b58f2d5664ec6 Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Tue, 26 May 2015 17:47:09 -0500 Subject: [PATCH] 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 --- org.adempiere.base/src/org/compiere/util/Env.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/org.adempiere.base/src/org/compiere/util/Env.java b/org.adempiere.base/src/org/compiere/util/Env.java index 7656bffacc..dcc4c73031 100644 --- a/org.adempiere.base/src/org/compiere/util/Env.java +++ b/org.adempiere.base/src/org/compiere/util/Env.java @@ -575,7 +575,7 @@ public final class Env if (TAB_INFO == TabNo) return s != null ? s : ""; // - if (s == null) + if (Util.isEmpty(s)) return getContext(ctx, WindowNo, context, false); return s; } // getContext @@ -617,7 +617,7 @@ public final class Env if (TAB_INFO == TabNo) return s != null ? s : ""; // - if (s == null && ! onlyTab) + if (Util.isEmpty(s) && ! onlyTab) return getContext(ctx, WindowNo, context, onlyWindow); return s; } // getContext @@ -709,7 +709,7 @@ public final class Env public static int getContextAsInt (Properties ctx, int WindowNo, int TabNo, String context) { String s = getContext(ctx, WindowNo, TabNo, context); - if (s.length() == 0) + if (Util.isEmpty(s)) return 0; // try