Package org.projectforge.web.wicket

Examples of org.projectforge.web.wicket.ListSelectActionPanel


        @Override
        public void populateItem(final Item<ICellPopulator<TimesheetDO>> item, final String componentId,
            final IModel<TimesheetDO> rowModel)
        {
          final TimesheetDO timesheet = rowModel.getObject();
          final ListSelectActionPanel actionPanel = new ListSelectActionPanel(componentId,
              createRecentTimeSheetSelectionLink(timesheet), new Model<String>() {
            @Override
            public String getObject()
            {
              final StringBuffer buf = new StringBuffer();
              if (timesheet.getKost2() != null) {
                buf.append(timesheet.getKost2().getShortDisplayName());
              }
              if (timesheet.getUserId() != null && timesheet.getUserId().equals(PFUserContext.getUserId()) == false) {
                if (timesheet.getKost2() != null) {
                  buf.append(", ");
                }
                buf.append(userFormatter.getFormattedUser(timesheet.getUserId()));
              }
              return buf.toString();
            }
          });
          item.add(actionPanel);
          item.add(AttributeModifier.append("style", new Model<String>("white-space: nowrap;")));
          final Item< ? > row = item.findParent(Item.class);
          WicketUtils.addRowClick(row);
          cellItemListener.populateItem(item, componentId, rowModel);
        }
      });
      columns.add(new CellItemListenerPropertyColumn<TimesheetDO>(new Model<String>(getString("fibu.kunde")), null,
          "kost2.projekt.kunde.name", cellItemListener));
      columns.add(new CellItemListenerPropertyColumn<TimesheetDO>(new Model<String>(getString("fibu.projekt")), null, "kost2.projekt.name",
          cellItemListener));
      columns.add(new TaskPropertyColumn<TimesheetDO>(getString("task"), null, "task", cellItemListener).withTaskTree(taskTree));
    } else {
      columns.add(new CellItemListenerPropertyColumn<TimesheetDO>(new Model<String>(getString("task")), null, "task.title",
          cellItemListener) {
        @Override
        public void populateItem(final Item<ICellPopulator<TimesheetDO>> item, final String componentId, final IModel<TimesheetDO> rowModel)
        {
          final TimesheetDO timesheet = rowModel.getObject();
          final TaskDO task = rowModel.getObject().getTask();
          final Label label = new Label("label", task != null ? task.getTitle() : "");
          final ListSelectActionPanel actionPanel = new ListSelectActionPanel(componentId, createRecentTimeSheetSelectionLink(timesheet),
              label);
          WicketUtils.addTooltip(label, TaskFormatter.instance().getTaskPath(task.getId(), false, OutputType.HTML));
          item.add(actionPanel);
          final Item< ? > row = item.findParent(Item.class);
          WicketUtils.addRowClick(row);
View Full Code Here


        "nummer", cellItemListener) {
      @Override
      public void populateItem(final Item<ICellPopulator<AuftragDO>> item, final String componentId, final IModel<AuftragDO> rowModel)
      {
        final AuftragDO auftrag = rowModel.getObject();
        item.add(new ListSelectActionPanel(componentId, rowModel, AuftragEditPage.class, auftrag.getId(), returnToPage, String
            .valueOf(auftrag.getNummer())));
        cellItemListener.populateItem(item, componentId, rowModel);
        addRowClick(item);
      }
    });
View Full Code Here

            kreditor += " *** " + CurrencyFormatter.format(fehlBetrag) + " ***";
          }
        }
        final Label kreditorLabel = new Label(ListSelectActionPanel.LABEL_ID, kreditor);
        kreditorLabel.setEscapeModelStrings(false);
        item.add(new ListSelectActionPanel(componentId, rowModel, EingangsrechnungEditPage.class, eingangsrechnung.getId(), returnToPage,
            kreditorLabel));
        cellItemListener.populateItem(item, componentId, rowModel);
        addRowClick(item);
      }
    });
View Full Code Here

       */
      @Override
      public void populateItem(final Item<ICellPopulator<ScriptDO>> item, final String componentId, final IModel<ScriptDO> rowModel)
      {
        final ScriptDO script = rowModel.getObject();
        item.add(new ListSelectActionPanel(componentId, rowModel, ScriptExecutePage.class, script.getId(), ScriptListPage.this, script
            .getName()));
        cellItemListener.populateItem(item, componentId, rowModel);
        addRowClick(item);
      }
    });
View Full Code Here

      @Override
      public void populateItem(final Item<ICellPopulator<KontoDO>> item, final String componentId, final IModel<KontoDO> rowModel)
      {
        final KontoDO konto = rowModel.getObject();
        if (isSelectMode() == false) {
          item.add(new ListSelectActionPanel(componentId, rowModel, KontoEditPage.class, konto.getId(), returnToPage, String.valueOf(konto
              .getNummer())));
        } else {
          item.add(new ListSelectActionPanel(componentId, rowModel, caller, selectProperty, konto.getId(),
              String.valueOf(konto.getNummer())));
        }
        cellItemListener.populateItem(item, componentId, rowModel);
        addRowClick(item);
      }
View Full Code Here

        if (userPref.getArea() != null) {
          label = getString(userPref.getArea().getI18nKey());
        } else {
          label = "";
        }
        item.add(new ListSelectActionPanel(componentId, rowModel, UserPrefEditPage.class, userPref.getId(), UserPrefListPage.this, label));
        cellItemListener.populateItem(item, componentId, rowModel);
        addRowClick(item);
      }
    });
    columns.add(new CellItemListenerPropertyColumn<UserPrefDO>(new Model<String>(getString("userPref.name")), "name", "name",
View Full Code Here

       */
      @Override
      public void populateItem(final Item<ICellPopulator<PollDO>> item, final String componentId, final IModel<PollDO> rowModel)
      {
        final PollDO poll = rowModel.getObject();
        item.add(new ListSelectActionPanel(componentId, rowModel, NewPollOverviewPage.class, poll.getId(), returnToPage, poll.getTitle()));
        cellItemListener.populateItem(item, componentId, rowModel);
        addRowClick(item);
      }
    });
    columns.add(new CellItemListenerPropertyColumn<PollDO>(getString("plugins.poll.new.description"), getSortable("description", sortable),
View Full Code Here

      @Override
      public void populateItem(final Item<ICellPopulator<Kost1DO>> item, final String componentId, final IModel<Kost1DO> rowModel)
      {
        final Kost1DO kost1 = rowModel.getObject();
        if (isSelectMode() == false) {
          item.add(new ListSelectActionPanel(componentId, rowModel, Kost1EditPage.class, kost1.getId(), returnToPage, String.valueOf(kost1
              .getFormattedNumber())));
          cellItemListener.populateItem(item, componentId, rowModel);
        } else {
          item.add(new ListSelectActionPanel(componentId, rowModel, caller, selectProperty, kost1.getId(), String.valueOf(kost1
              .getFormattedNumber())));
        }
        cellItemListener.populateItem(item, componentId, rowModel);
        addRowClick(item);
      }
View Full Code Here

        final StringBuffer buf = new StringBuffer();
        taskFormatter.appendFormattedTask(getRequestCycle(), buf, task, true, false);
        final Label formattedTaskLabel = new Label(ListSelectActionPanel.LABEL_ID, buf.toString());
        formattedTaskLabel.setEscapeModelStrings(false);
        if (isSelectMode() == false) {
          item.add(new ListSelectActionPanel(componentId, rowModel, TaskEditPage.class, task.getId(), returnToPage, formattedTaskLabel));
        } else {
          item.add(new ListSelectActionPanel(componentId, rowModel, caller, selectProperty, task.getId(), formattedTaskLabel));
        }
        cellItemListener.populateItem(item, componentId, rowModel);
        addRowClick(item);
      }
    });
View Full Code Here

      @Override
      public void populateItem(final Item<ICellPopulator<ConfigurationDO>> item, final String componentId,
          final IModel<ConfigurationDO> rowModel)
      {
        final ConfigurationDO configuration = rowModel.getObject();
        item.add(new ListSelectActionPanel(componentId, rowModel, ConfigurationEditPage.class, configuration.getId(),
            ConfigurationListPage.this, getString(configuration.getI18nKey())));
        addRowClick(item);
        cellItemListener.populateItem(item, componentId, rowModel);
      }
    });
View Full Code Here

TOP

Related Classes of org.projectforge.web.wicket.ListSelectActionPanel

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.