Package ro.fortsoft.wicket.dashboard

Examples of ro.fortsoft.wicket.dashboard.Widget


        item.add(new AjaxCheckBox("display", Model.of(isDisplayed(wd) != null)) {
          private static final long serialVersionUID = -7079665921153653164L;

          @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


        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()));
View Full Code Here

        item.add(new AjaxCheckBox("display", Model.of(isDisplayed(wd) != null)) {
          private static final long serialVersionUID = 1L;

          @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

TOP

Related Classes of ro.fortsoft.wicket.dashboard.Widget

Copyright © 2018 www.massapicom. 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.