Backed out changeset: 73faec21c2de IDEMPIERE-1196
This commit is contained in:
parent
df7d83520b
commit
374d7ac576
|
@ -6,7 +6,6 @@ import java.util.HashMap;
|
|||
import java.util.List;
|
||||
import java.util.Properties;
|
||||
|
||||
import org.compiere.util.CCache;
|
||||
import org.jfree.chart.ChartFactory;
|
||||
import org.jfree.chart.JFreeChart;
|
||||
import org.jfree.chart.axis.CategoryAxis;
|
||||
|
@ -25,29 +24,15 @@ import org.jfree.data.time.TimeSeriesCollection;
|
|||
import org.jfree.data.xy.IntervalXYDataset;
|
||||
|
||||
public class MChart extends X_AD_Chart {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 6001892625463139079L;
|
||||
private static final long serialVersionUID = -8851465915516536910L;
|
||||
|
||||
private int windowNo=0;
|
||||
private Dataset dataset;
|
||||
private HashMap<String,MQuery> queries;
|
||||
|
||||
private static CCache<Integer,MChart> s_cache = new CCache<Integer,MChart>("AD_Chart", 30, 60);
|
||||
|
||||
public static MChart get (Properties ctx, int AD_Chart_ID)
|
||||
{
|
||||
Integer key = new Integer(AD_Chart_ID);
|
||||
MChart retValue = (MChart)s_cache.get(key);
|
||||
if (retValue == null)
|
||||
{
|
||||
retValue = new MChart (ctx, AD_Chart_ID, null);
|
||||
s_cache.put(key, retValue);
|
||||
}
|
||||
|
||||
return retValue;
|
||||
} // get
|
||||
|
||||
public MChart(Properties ctx, int AD_Chart_ID, String trxName) {
|
||||
super(ctx, AD_Chart_ID, trxName);
|
||||
|
|
|
@ -8,7 +8,6 @@ import java.util.ArrayList;
|
|||
import java.util.List;
|
||||
import java.util.Properties;
|
||||
|
||||
import org.compiere.util.CCache;
|
||||
import org.compiere.util.Env;
|
||||
|
||||
/**
|
||||
|
@ -16,26 +15,11 @@ import org.compiere.util.Env;
|
|||
*
|
||||
*/
|
||||
public class MDashboardContent extends X_PA_DashboardContent
|
||||
{
|
||||
{
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = -3565359682982006243L;
|
||||
|
||||
private static CCache<Integer,MDashboardContent> s_cache = new CCache<Integer,MDashboardContent>("PA_DashboardContent_ID", 30, 60);
|
||||
|
||||
public static MDashboardContent get (Properties ctx, int PA_DashboardContent_ID)
|
||||
{
|
||||
Integer key = new Integer(PA_DashboardContent_ID);
|
||||
MDashboardContent retValue = (MDashboardContent)s_cache.get(key);
|
||||
if (retValue == null)
|
||||
{
|
||||
retValue = new MDashboardContent (ctx, PA_DashboardContent_ID, null);
|
||||
s_cache.put(key, retValue);
|
||||
}
|
||||
|
||||
return retValue;
|
||||
} // get
|
||||
private static final long serialVersionUID = -1360395253302002667L;
|
||||
|
||||
public static int getForSessionColumnCount(boolean isShowInDashboard, int AD_User_ID, int AD_Role_ID)
|
||||
{
|
||||
|
|
|
@ -336,13 +336,11 @@ public class DashboardController implements EventListener<Event> {
|
|||
if(url != null)
|
||||
{
|
||||
try {
|
||||
Map<String,Integer> map = new HashMap<String, Integer>();
|
||||
map.put("DCID", dc.getPA_DashboardContent_ID());
|
||||
|
||||
Component component = null;
|
||||
List<IDashboardGadgetFactory> f = Service.locator().list(IDashboardGadgetFactory.class).getServices();
|
||||
for (IDashboardGadgetFactory factory : f) {
|
||||
component = factory.getGadget(url.toString(),content,map);
|
||||
component = factory.getGadget(url.toString(),content);
|
||||
if(component != null)
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -13,8 +13,6 @@
|
|||
*****************************************************************************/
|
||||
package org.adempiere.webui.factory;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import org.zkoss.zk.ui.Component;
|
||||
|
||||
/**
|
||||
|
@ -29,5 +27,5 @@ public interface IDashboardGadgetFactory {
|
|||
* @param parent
|
||||
* @return Component instance of DashboardPanel or null
|
||||
*/
|
||||
public Component getGadget(String uri, Component parent, Map<?, ?> args);
|
||||
public Component getGadget(String uri, Component parent);
|
||||
}
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
package org.adempiere.webui.factory;
|
||||
|
||||
import java.net.URL;
|
||||
import java.util.Map;
|
||||
|
||||
import org.adempiere.base.Core;
|
||||
import org.adempiere.base.IResourceFinder;
|
||||
|
@ -29,12 +28,12 @@ import org.zkoss.zk.ui.Executions;
|
|||
*/
|
||||
public class ZulDashboardGadgetFactory implements IDashboardGadgetFactory {
|
||||
@Override
|
||||
public Component getGadget(String uri, Component parent, Map<?, ?> args) {
|
||||
public Component getGadget(String uri, Component parent) {
|
||||
if (uri != null && uri.toLowerCase().endsWith(".zul")) {
|
||||
IResourceFinder rf = Core.getResourceFinder();
|
||||
URL url = rf.getResource(uri);
|
||||
if(url!=null)
|
||||
return Executions.createComponents(url.toString(), parent, args);
|
||||
return Executions.createComponents(url.toString(), parent, null);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue