Examples of DashboardContext


Examples of net.sourceforge.processdash.DashboardContext

            xml = null;
        }
    }

    private void writeTimingState() {
        DashboardContext ctx = getDashboardContext();
        DashboardTimeLog tl = (DashboardTimeLog) ctx.getTimeLog();
        TimeLoggingModel tlm = tl.getTimeLoggingModel();
        String path = tlm.getActiveTaskModel().getPath();
        String isTiming = tlm.isPaused() ? "false" : "true";

        out.write("Content-Type: text/plain\r\n\r\n");
View Full Code Here

Examples of net.sourceforge.processdash.DashboardContext

        String result = getPrefix();

        // if the request did not supply a prefix, use the path of the currently
        // selected task
        if (!StringUtils.hasValue(result)) {
            DashboardContext ctx = getDashboardContext();
            DashboardTimeLog tl = (DashboardTimeLog) ctx.getTimeLog();
            TimeLoggingModel tlm = tl.getTimeLoggingModel();
            result = tlm.getActiveTaskModel().getPath();
        }

        return result;
View Full Code Here

Examples of net.sourceforge.processdash.DashboardContext

    protected List<ChartItem> writeCharts(EVTaskList evModel,
            EVSchedule schedule, EVTaskFilter filter, boolean hideNames,
            int width, int height, ChartListPurpose p,
            String singleChartId, Map<String, String> chartHelpMap) {
        DashboardContext ctx = getDashboardContext();
        Object exportMarker = parameters.get("EXPORT");
        boolean filterInEffect = (filter != null);
        boolean isRollup = (evModel instanceof EVTaskListRollup);
        List<ChartItem> chartList = TaskScheduleChartUtil.getChartsForTaskList(
            evModel.getID(), getDataRepository(), filterInEffect, isRollup,
View Full Code Here

Examples of org.jmanage.webui.dashboard.framework.DashboardContext

   
    public static String refreshComponent(WebContext context, HttpServletRequest request,
            String dashboardId, String componentId){

        DashboardConfig dashboardConfig = DashboardRepository.getInstance().get(dashboardId);
        DashboardContext dashboardContext = new DashboardContextImpl(context, dashboardConfig,
                request, true); // set the refresh request       
        assert dashboardConfig != null : "Error retrieving dashboard details. id=" + dashboardId;
        DashboardComponent component = dashboardConfig.getComponents().get(componentId);
        assert component != null : "Error retrieving component. id=" + componentId;
        try{
View Full Code Here

Examples of ro.fortsoft.wicket.dashboard.web.DashboardContext

    getResourceSettings().getStringResourceLoaders().add(0, new LabelResourceLoader());
   
    super.init();
   
    // register some widgets
    dashboardContext = new DashboardContext();
    dashboardContext.setDashboardPersiter(new UserDashboardPersister());
    WidgetRegistry widgetRegistry = dashboardContext.getWidgetRegistry();
    widgetRegistry.registerWidget(new PrivateRoomsWidgetDescriptor());
    widgetRegistry.registerWidget(new WelcomeWidgetDescriptor());
    widgetRegistry.registerWidget(new StartWidgetDescriptor());
View Full Code Here

Examples of ro.fortsoft.wicket.dashboard.web.DashboardContext

    String tzCode = get().getClientTZCode();
    return tzCode == null ? null : TimeZone.getTimeZone(tzCode);
  }
 
  private void initDashboard() {
    DashboardContext dashboardContext = getDashboardContext();
    dashboard = dashboardContext.getDashboardPersiter().load();
    if (dashboard == null) {
      dashboard = new DefaultDashboard("default", "Default");
     
      WidgetFactory widgetFactory = dashboardContext.getWidgetFactory();
      dashboard.addWidget(widgetFactory.createWidget(new WelcomeWidgetDescriptor()));
      dashboard.addWidget(widgetFactory.createWidget(new StartWidgetDescriptor()));
      ConfigurationDao cfgDao = getBean(ConfigurationDao.class);
      if (1 == cfgDao.getConfValue(CONFIG_DASHBOARD_SHOW_MYROOMS_KEY, Integer.class, "0")) {
        dashboard.addWidget(widgetFactory.createWidget(new PrivateRoomsWidgetDescriptor()));
      }
      if (1 == cfgDao.getConfValue(CONFIG_DASHBOARD_SHOW_RSS_KEY, Integer.class, "0")) {
        dashboard.addWidget(widgetFactory.createWidget(new RssWidgetDescriptor()));
      }
      dashboardContext.getDashboardPersiter().save(dashboard);
    } else {
      for (Widget w : dashboard.getWidgets()) {
        w.init();
      }
    }
View Full Code Here

Examples of ro.fortsoft.wicket.dashboard.web.DashboardContext

    }
    return _zone == null ? null : _zone.getID();
  }
 
  private void initDashboard() {
    DashboardContext dashboardContext = getDashboardContext();
    dashboard = dashboardContext.getDashboardPersiter().load();
    if (dashboard == null) {
      dashboard = new DefaultDashboard("default", "Default");
     
      WidgetFactory widgetFactory = dashboardContext.getWidgetFactory();
      dashboard.addWidget(widgetFactory.createWidget(new WelcomeWidgetDescriptor()));
      dashboard.addWidget(widgetFactory.createWidget(new StartWidgetDescriptor()));
      ConfigurationDao cfgDao = getBean(ConfigurationDao.class);
      if ("1".equals(cfgDao.getConfValue(CONFIG_DASHBOARD_SHOW_MYROOMS_KEY, Integer.class, "0"))) {
        dashboard.addWidget(widgetFactory.createWidget(new PrivateRoomsWidgetDescriptor()));
      }
      if ("1".equals(cfgDao.getConfValue(CONFIG_DASHBOARD_SHOW_RSS_KEY, Integer.class, "0"))) {
        dashboard.addWidget(widgetFactory.createWidget(new RssWidgetDescriptor()));
      }
      dashboardContext.getDashboardPersiter().save(dashboard);
    } else {
      for (Widget w : dashboard.getWidgets()) {
        w.init();
      }
    }
View Full Code Here

Examples of ro.fortsoft.wicket.dashboard.web.DashboardContext

    getResourceSettings().getStringResourceLoaders().add(0, new LabelResourceLoader());
   
    super.init();
   
    // register some widgets
    dashboardContext = new DashboardContext();
    dashboardContext.setDashboardPersiter(new UserDashboardPersister());
    WidgetRegistry widgetRegistry = dashboardContext.getWidgetRegistry();
    widgetRegistry.registerWidget(new PrivateRoomsWidgetDescriptor());
    widgetRegistry.registerWidget(new WelcomeWidgetDescriptor());
    widgetRegistry.registerWidget(new StartWidgetDescriptor());
View Full Code Here

Examples of ro.fortsoft.wicket.dashboard.web.DashboardContext

          @Override
          protected void onUpdate(AjaxRequestTarget target) {
            Widget w = isDisplayed(wd);
            boolean b = getModelObject();
            DashboardContext dashboardContext = getDashboardContext();
            Dashboard d = getDashboard();
            if (w != null && !b) {
              d.deleteWidget(w.getId());
            }
            if (w == null && b) {
              d.addWidget(dashboardContext.getWidgetFactory().createWidget(wd));
            }
            dashboardContext.getDashboardPersiter().save(d);
          }
        });
      }
    });
  }
View Full Code Here

Examples of ro.fortsoft.wicket.dashboard.web.DashboardContext

    String tzCode = get().getClientTZCode();
    return tzCode == null ? null : TimeZone.getTimeZone(tzCode);
  }
 
  private void initDashboard() {
    DashboardContext dashboardContext = getDashboardContext();
    dashboard = (UserDashboard)dashboardContext.getDashboardPersiter().load();
    boolean existMyRoomWidget = false, existRssWidget = false;
    ConfigurationDao cfgDao = getBean(ConfigurationDao.class);
    boolean confShowMyRooms = 1 == cfgDao.getConfValue(CONFIG_DASHBOARD_SHOW_MYROOMS_KEY, Integer.class, "0");
    boolean confShowRss = 1 == cfgDao.getConfValue(CONFIG_DASHBOARD_SHOW_RSS_KEY, Integer.class, "0");
    boolean save = false;

    WidgetFactory widgetFactory = dashboardContext.getWidgetFactory();

    if (dashboard == null) {
      dashboard = new UserDashboard("default", "Default");

      dashboard.addWidget(widgetFactory.createWidget(new WelcomeWidgetDescriptor()));
      dashboard.addWidget(widgetFactory.createWidget(new StartWidgetDescriptor()));
      if (confShowMyRooms) {
        dashboard.addWidget(widgetFactory.createWidget(new MyRoomsWidgetDescriptor()));
      }
      if (confShowRss) {
        dashboard.addWidget(widgetFactory.createWidget(new RssWidgetDescriptor()));
      }
      save = true;
    } else {
      for (Iterator<Widget> iter = dashboard.getWidgets().iterator(); iter.hasNext();) {
        Widget w = iter.next();
        // PrivateRoomWidget is stored in the profile of user. Now, Show_MyRooms_key is disable.
        if (w.getClass().equals(MyRoomsWidget.class)) {
          existMyRoomWidget = true;
          if (!confShowMyRooms) {
            iter.remove();
          }
        } else if ((w.getClass().equals(RssWidget.class))) {
          // RssWidget is stored in the profile of user. Now, Show_RSS_Key is disable.
          existRssWidget = true;
          if (!confShowRss) {
            iter.remove();
          }
        } else {
          w.init();
        }
      }
      // PrivateRoomWidget was deleted from profile and now it's enabled. It's added again to dashboard.
      if (!existMyRoomWidget && confShowMyRooms && !dashboard.isWidgetMyRoomsDeleted()) {
        dashboard.addWidget(widgetFactory.createWidget(new MyRoomsWidgetDescriptor()));
        save = true;
      }
      // RssWidget was deleted from profile and now it's enabled. It's added again to dashboard.
      if (!existRssWidget && confShowRss && !dashboard.isWidgetRssDeleted()) {
        dashboard.addWidget(widgetFactory.createWidget(new RssWidgetDescriptor()));
        save = true;
      }
    }
    if (save) {
      dashboardContext.getDashboardPersiter().save(dashboard);
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.