IDEMPIERE-234 Configurable Toolbar / Prefix _WinInfo_ for context variables AD_Window_UU, AD_Window_ID and WindowName
This commit is contained in:
parent
1e2ea6386d
commit
0ce064eec6
|
@ -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);
|
||||
|
|
|
@ -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"));
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -355,7 +355,7 @@ public class ZkReportViewer extends Window implements EventListener<Event>, 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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue