Examples of DashboardContext


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

    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 MyRoomsWidgetDescriptor());
    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

    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
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.