From 2b6321b8d901f35f1f32c8219470a94a277b4cf7 Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Wed, 8 Nov 2017 09:43:50 +0100 Subject: [PATCH] IDEMPIERE-3550 Window Title Logic is ignored when using Undo button on sub tab --- .../WEB-INF/src/org/adempiere/webui/apps/AEnv.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/AEnv.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/AEnv.java index 7293618ce9..d316ac2cc1 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/AEnv.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/AEnv.java @@ -692,9 +692,15 @@ public final class AEnv sb.append(prefix); if (windowNo > 0){ sb.append(Env.getContext(ctx, windowNo, "_WinInfo_WindowName", false)).append(": "); - final String documentNo = Env.getContext(ctx, windowNo, "DocumentNo", false); - final String value = Env.getContext(ctx, windowNo, "Value", false); - final String name = Env.getContext(ctx, windowNo, "Name", false); + String documentNo = Env.getContext(ctx, windowNo, "DocumentNo", false); + if (Util.isEmpty(documentNo)) // try first tab + documentNo = Env.getContext(ctx, windowNo, 0, "DocumentNo", false); + String value = Env.getContext(ctx, windowNo, "Value", false); + if (Util.isEmpty(value)) // try first tab + value = Env.getContext(ctx, windowNo, 0, "Value", false); + String name = Env.getContext(ctx, windowNo, "Name", false); + if (Util.isEmpty(name)) // try first tab + name = Env.getContext(ctx, windowNo, 0, "Name", false); if(!"".equals(documentNo)) { sb.append(documentNo).append(" "); }