Package org.projectforge.web.wicket.components

Examples of org.projectforge.web.wicket.components.PlainLabel


  public void populateItem(final Item<ICellPopulator<T>> item, final String componentId, final IModel<T> rowModel)
  {
    final BigDecimal value = (BigDecimal) BeanHelper.getProperty(rowModel.getObject(), getPropertyExpression());
    final Label label;
    if (this.suppressZeroValues == true && value != null && value.compareTo(BigDecimal.ZERO) == 0) {
      label = new PlainLabel(componentId, "");
    } else {
      label = new PlainLabel(componentId, CurrencyFormatter.format(value));
    }
    item.add(label);
    if (cellItemListener != null) {
      cellItemListener.populateItem(item, componentId, rowModel);
    }
View Full Code Here


   * @param label The label string to show (additional to the row_pointer.png).
   */
  public ListSelectActionPanel(final String id, final IModel< ? > model, final ISelectCallerPage caller, final String selectProperty,
      final Integer objectId, final String label)
  {
    this(id, model, caller, selectProperty, objectId, new PlainLabel(LABEL_ID, label));
  }
View Full Code Here

   * @see WicketUtils#getPageParameters(String[])
   */
  public ListSelectActionPanel(final String id, final IModel< ? > model, final Class< ? extends WebPage> editClass, final Integer objectId,
      final WebPage returnToPage, final String label, final String... params)
  {
    this(id, model, editClass, objectId, returnToPage, new PlainLabel(LABEL_ID, label), params);
  }
View Full Code Here

        return currentReport != null ? currentReport.getId() + " - " + currentReport.getTitle() + ": " + currentReport.getZeitraum() + " (beta)": "(beta)";
      }
    }));
    add(path = new WebMarkupContainer("path"));
    path.add(actionLinkRepeater = new RepeatingView("actionLinkRepeater"));
    path.add(new PlainLabel("reportId", new Model<String>() {
      /**
       * @see org.apache.wicket.model.Model#getObject()
       */
      @Override
      public String getObject()
      {
        return currentReport != null ? currentReport.getId() : "";
      }
    }));
    add(new PlainLabel("reportObjectiveId", new Model<String>() {
      @Override
      public String getObject()
      {
        return currentReport != null ? currentReport.getReportObjective().getId() : "";
      }
View Full Code Here

        if (childReport.hasChilds() == true) {
          item.add(createReportLink("actionLink", reportStorage, childReport.getId()));
          item.add(new Label("childId", "[invisible]").setVisible(false));
        } else {
          item.add(new Label("actionLink", "[invisible]").setVisible(false));
          item.add(new PlainLabel("childId", childReport.getId()));
        }
        item.add(new SubmitLink("showAccountingRecordsLink") {
          @Override
          public void onSubmit()
          {
            setResponsePage(new AccountingRecordListPage(AccountingRecordListPage.getPageParameters(childReport.getId())));
          }
        });
      }
    }
    rowRepeater.removeAll();
    int row = 0;
    final BusinessAssessmentTable businessAssessmentTable = currentReport.getChildBusinessAssessmentTable(true);
    final BusinessAssessment firstBusinessAssessment = businessAssessmentTable.getBusinessAssessmentList().get(0).getValue();
    for (final BusinessAssessmentRow firstBusinessAssessmentRow : firstBusinessAssessment.getRows()) { // First BusinessAssessment for
      // getting meta data of
      // BusinessAssessment.
      if (priority.ordinal() > firstBusinessAssessmentRow.getPriority().ordinal()) {
        // Don't show all business assessment rows (priority is here a kind of verbose level).
        continue;
      }
      final WebMarkupContainer rowContainer = new WebMarkupContainer(rowRepeater.newChildId());
      rowRepeater.add(rowContainer);
      rowContainer.add(AttributeModifier.replace("class", (row++ % 2 == 0) ? "even" : "odd"));
      rowContainer.add(new Label("zeileNo", firstBusinessAssessmentRow.getNo()));
      StringBuffer buf = new StringBuffer();
      for (int i = 0; i < firstBusinessAssessmentRow.getIndent(); i++) {
        buf.append("&nbsp;&nbsp;");
      }
      buf.append(HtmlHelper.escapeXml(firstBusinessAssessmentRow.getTitle()));
      rowContainer.add(new Label("description", buf.toString()).setEscapeModelStrings(false));
      final RepeatingView cellRepeater = new RepeatingView("cellRepeater");
      rowContainer.add(cellRepeater);
      int col = 0;
      for (final LabelValueBean<String, BusinessAssessment> lv : businessAssessmentTable.getBusinessAssessmentList()) {
        // So display the row for every BusinessAssessment:
        final String reportId = lv.getLabel();
        final BusinessAssessment businessAssessment = lv.getValue();
        final BusinessAssessmentRow businessAssessmentRow = businessAssessment.getRow(firstBusinessAssessmentRow.getId());
        final WebMarkupContainer item = new WebMarkupContainer(cellRepeater.newChildId());
        cellRepeater.add(item);
        buf = new StringBuffer();
        buf.append("text-align: right; white-space: nowrap;");
        if (col++ == 0) {
          buf.append(" font-weight: bold;");
        }
        final BigDecimal amount = businessAssessmentRow.getAmount();
        if (amount != null && amount.compareTo(BigDecimal.ZERO) < 0) {
          buf.append(" color: red;");
        }
        item.add(AttributeModifier.replace("style", buf.toString()));
        item.add(new PlainLabel("bwaWert", NumberHelper.isNotZero(businessAssessmentRow.getAmount()) == true ? CurrencyFormatter
            .format(businessAssessmentRow.getAmount()) : ""));
        item.add(new SubmitLink("showAccountingRecordsLink") {
          @Override
          public void onSubmit()
          {
View Full Code Here

      @Override
      public void onSubmit()
      {
        parentPage.getReportStorage().setCurrentReport(reportId);
      }
    }.add(new PlainLabel("label", reportId));
  }
View Full Code Here

      buf.append(" | Unmodified=").append(sheet.getNumberOfUnmodifiedElements());
    }
    if (sheet.getNumberOfFaultyElements() > 0) {
      buf.append(" | Errors=<span style=\"color: red; font-weight: bold;\">").append(sheet.getNumberOfFaultyElements()).append("</span>");
    }
    cont.add(new PlainLabel("statistics", buf.toString()).setEscapeModelStrings(false));
    final RepeatingView actionLinkRepeater = new RepeatingView("actionLinkRepeater");
    cont.add(actionLinkRepeater);
    if (sheet.isReconciled() == false
        || sheet.getStatus().isIn(ImportStatus.IMPORTED, ImportStatus.NOTHING_TODO, ImportStatus.HAS_ERRORS) == true) {
      addActionLink(actionLinkRepeater, new SubmitLink("actionLink") {
View Full Code Here

TOP

Related Classes of org.projectforge.web.wicket.components.PlainLabel

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.