diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/dashboard/DPCalendar.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/dashboard/DPCalendar.java index 95732f1b06..7ddccf7ded 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/dashboard/DPCalendar.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/dashboard/DPCalendar.java @@ -90,7 +90,6 @@ public class DPCalendar extends DashboardPanel implements EventListener, private static final String ON_REQUEST_CHANGED_TOPIC = "onRequestChanged"; private EventWindow eventWin; - private Properties ctx; private WeakReference desktop; private ArrayList events; private DesktopCleanup listener; @@ -103,9 +102,6 @@ public class DPCalendar extends DashboardPanel implements EventListener, public DPCalendar() { super(); - ctx = new Properties(); - ctx.putAll(Env.getCtx()); - Component component = Executions.createComponents(ThemeManager.getThemeResource("zul/calendar/calendar_mini.zul"), this, null); calendars = (Calendars) component.getFellow("cal"); @@ -439,7 +435,7 @@ public class DPCalendar extends DashboardPanel implements EventListener, } private void refreshModel() { - events = getEvents(0, ctx); + events = getEvents(0, Env.getCtx()); } private void updateDateLabel() { @@ -473,8 +469,8 @@ public class DPCalendar extends DashboardPanel implements EventListener, String userId = (String) event.getProperty(I_R_Request.COLUMNNAME_AD_User_ID); String createdBy = (String) event.getProperty(I_R_Request.COLUMNNAME_CreatedBy); - String AD_Client_ID = Integer.toString(Env.getAD_Client_ID(ctx)); - String AD_User_ID = Integer.toString(Env.getAD_User_ID(ctx)); + String AD_Client_ID = Integer.toString(Env.getAD_Client_ID(Env.getCtx())); + String AD_User_ID = Integer.toString(Env.getAD_User_ID(Env.getCtx())); if (clientId.equals(AD_Client_ID) && !"0".equals(AD_User_ID)) { if (salesRepId.equals(AD_User_ID) || userId.equals(AD_User_ID) || createdBy.equals(AD_User_ID)) { try { diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/dashboard/DPRecentItems.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/dashboard/DPRecentItems.java index aaf9f43a66..d48f36b7ea 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/dashboard/DPRecentItems.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/dashboard/DPRecentItems.java @@ -15,7 +15,6 @@ package org.adempiere.webui.dashboard; import java.lang.ref.WeakReference; import java.util.List; -import java.util.Properties; import org.adempiere.base.Service; import org.adempiere.base.event.EventManager; @@ -75,8 +74,6 @@ public class DPRecentItems extends DashboardPanel implements EventListener desktop; private DesktopCleanup listener; @@ -85,9 +82,7 @@ public class DPRecentItems extends DashboardPanel implements EventListener 0) { - MRecentItem ri = MRecentItem.get(ctx, AD_RecentItem_ID); - String TableName = MTable.getTableName(ctx, ri.getAD_Table_ID()); + MRecentItem ri = MRecentItem.get(Env.getCtx(), AD_RecentItem_ID); + String TableName = MTable.getTableName(Env.getCtx(), ri.getAD_Table_ID()); MQuery query = MQuery.getEqualQuery(TableName + "_ID", ri.getRecord_ID()); SessionManager.getAppDesktop().openWindow(ri.getAD_Window_ID(), query, null); @@ -248,11 +243,11 @@ public class DPRecentItems extends DashboardPanel implements EventListener ris = MRecentItem.getFromUser(ctx, AD_User_ID); + List ris = MRecentItem.getFromUser(Env.getCtx(), AD_User_ID); int riShown = 0; for (MRecentItem ri : ris) { if (ri.getAD_Window_ID() > 0 && MRole.getDefault().getWindowAccess(ri.getAD_Window_ID()) == null) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/dashboard/DPRunningJobs.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/dashboard/DPRunningJobs.java index 48707c3b04..1f3772bf56 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/dashboard/DPRunningJobs.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/dashboard/DPRunningJobs.java @@ -16,7 +16,6 @@ package org.adempiere.webui.dashboard; import java.lang.ref.WeakReference; import java.util.List; -import java.util.Properties; import org.adempiere.base.Service; import org.adempiere.base.event.EventManager; @@ -65,8 +64,6 @@ public class DPRunningJobs extends DashboardPanel implements EventListener desktop; private DesktopCleanup listener; @@ -75,9 +72,7 @@ public class DPRunningJobs extends DashboardPanel implements EventListener pis = getRunningJobForUser(ctx, AD_User_ID); + List pis = getRunningJobForUser(AD_User_ID); for (MPInstance pi : pis) { MProcess process = new MProcess(pi.getCtx(), pi.getAD_Process_ID(), pi.get_TrxName()); String label = process.getName() + " [" + Msg.getElement(pi.getCtx(), "Created") + " = " + pi.getCreated() + "]"; @@ -206,9 +201,9 @@ public class DPRunningJobs extends DashboardPanel implements EventListener getRunningJobForUser(Properties ctx, int AD_User_ID) + public static List getRunningJobForUser(int AD_User_ID) { - List pis = new Query(ctx, MPInstance.Table_Name, "Coalesce(AD_User_ID,0)=? AND IsProcessing='Y' AND IsRunAsJob='Y'", null) + List pis = new Query(Env.getCtx(), MPInstance.Table_Name, "Coalesce(AD_User_ID,0)=? AND IsProcessing='Y' AND IsRunAsJob='Y'", null) .setOnlyActiveRecords(true) .setClient_ID() .setParameters(AD_User_ID)