diff --git a/org.adempiere.base/src/org/compiere/util/Env.java b/org.adempiere.base/src/org/compiere/util/Env.java index d784ea833a..f241702965 100644 --- a/org.adempiere.base/src/org/compiere/util/Env.java +++ b/org.adempiere.base/src/org/compiere/util/Env.java @@ -1250,7 +1250,7 @@ public final class Env { StringBuilder sb = new StringBuilder(); if (WindowNo > 0){ - sb.append(getContext(ctx, WindowNo, "WindowName", false)).append(" "); + sb.append(getContext(ctx, WindowNo, "_WinInfo_WindowName", false)).append(" "); final String documentNo = getContext(ctx, WindowNo, "DocumentNo", false); final String value = getContext(ctx, WindowNo, "Value", false); final String name = getContext(ctx, WindowNo, "Name", false); diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/AMenu.java b/org.adempiere.ui.swing/src/org/compiere/apps/AMenu.java index b98d98e6cd..59030de8a1 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/AMenu.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/AMenu.java @@ -176,7 +176,7 @@ public final class AMenu extends CFrame treePanel.initTree(AD_Tree_ID); // Translate - Env.setContext(m_ctx, m_WindowNo, "WindowName", Msg.getMsg(m_ctx, "Menu")); + Env.setContext(m_ctx, m_WindowNo, "_WinInfo_WindowName", Msg.getMsg(m_ctx, "Menu")); setTitle(Env.getHeader(m_ctx, m_WindowNo)); progressBar.setString(Msg.getMsg(m_ctx, "SelectProgram")); diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/APanel.java b/org.adempiere.ui.swing/src/org/compiere/apps/APanel.java index 4f5d7eef88..89ced5b94f 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/APanel.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/APanel.java @@ -907,7 +907,7 @@ public final class APanel extends CPanel tabPanel.addTab(m_mWorkbench.getName(wb), m_mWorkbench.getIcon(wb), window, m_mWorkbench.getDescription(wb)); } // Used for Env.getHeader - Env.setContext(m_ctx, m_curWindowNo, "WindowName", m_mWorkbench.getName(wb)); + Env.setContext(m_ctx, m_curWindowNo, "_WinInfo_WindowName", m_mWorkbench.getName(wb)); } // Workbench Loop diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/form/FormFrame.java b/org.adempiere.ui.swing/src/org/compiere/apps/form/FormFrame.java index 2ecfdee2f4..e575e7af81 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/form/FormFrame.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/form/FormFrame.java @@ -321,7 +321,7 @@ public class FormFrame extends CFrame { if (log.isLoggable(Level.INFO)) log.info("AD_Form_ID=" + AD_Form_ID + " - Class=" + className); Properties ctx = Env.getCtx(); - Env.setContext(ctx, m_WindowNo, "WindowName", name); + Env.setContext(ctx, m_WindowNo, "_WinInfo_WindowName", name); setTitle(Env.getHeader(ctx, m_WindowNo)); this.gridTab = gridTab; diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/AbstractADWindowContent.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/AbstractADWindowContent.java index e34b452754..47e3d91660 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/AbstractADWindowContent.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/AbstractADWindowContent.java @@ -348,9 +348,12 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements if (tab == 0 && gridTab == null && m_findCancelled) return false; } - Env.setContext(ctx, curWindowNo, "WindowName", gridWindow.getName()); - Env.setContext(ctx, curWindowNo, "AD_Window_ID", gridWindow.getAD_Window_ID()); - Env.setContext(ctx, curWindowNo, "AD_Window_UU", gridWindow.getAD_Window_UU()); + // WindowName variable preserved for backward compatibility + // please consider it as DEPRECATED and use _WinInfo_WindowName instead + Env.setContext(ctx, curWindowNo, "WindowName", gridWindow.getName()); // deprecated + Env.setContext(ctx, curWindowNo, "_WinInfo_WindowName", gridWindow.getName()); + Env.setContext(ctx, curWindowNo, "_WinInfo_AD_Window_ID", gridWindow.getAD_Window_ID()); + Env.setContext(ctx, curWindowNo, "_WinInfo_AD_Window_UU", gridWindow.getAD_Window_UU()); if (gridTab != null) gridTab.getTableModel().setChanged(false); 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 9275a4abfe..228bf109ac 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 @@ -646,7 +646,7 @@ public final class AEnv { StringBuilder sb = new StringBuilder(); if (WindowNo > 0){ - sb.append(Env.getContext(ctx, WindowNo, "WindowName", false)).append(" "); + 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); @@ -710,7 +710,7 @@ public final class AEnv public static String getDialogHeader(Properties ctx, int windowNo) { StringBuilder sb = new StringBuilder(); if (windowNo > 0){ - sb.append(Env.getContext(ctx, windowNo, "WindowName", false)).append(" "); + 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); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/ZkReportViewer.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/ZkReportViewer.java index 0309bdf9ca..8287da6e43 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/ZkReportViewer.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/ZkReportViewer.java @@ -355,7 +355,7 @@ public class ZkReportViewer extends Window implements EventListener, ITab linkDiv.appendChild(reportLink); south.appendChild(linkDiv); //m_WindowNo - int AD_Window_ID = Env.getContextAsInt(Env.getCtx(), m_reportEngine.getWindowNo(), "AD_Window_ID", true); + int AD_Window_ID = Env.getContextAsInt(Env.getCtx(), m_reportEngine.getWindowNo(), "_WinInfo_AD_Window_ID", true); int AD_Process_ID = m_reportEngine.getPrintInfo() != null ? m_reportEngine.getPrintInfo().getAD_Process_ID() : 0; updateToolbarAccess(AD_Window_ID, AD_Process_ID);