Examples of PivotField


Examples of ro.fortsoft.wicket.pivot.PivotField

    /*
     * And restore the fields
     */
    for (PivotConfigField configField : this.pivotConfigFields) {
      PivotField field = null;
      if (configField.getFieldCalculationFunction() != null) {
        /*
         * Special field for field calculation
         */
        field = new PivotField("", model.getFields().size());
        field.setType(Double.class);
        model.getFields().add(field);
      } else
        field = model.getField(configField.getName());

      /*
 
View Full Code Here

Examples of ro.fortsoft.wicket.pivot.PivotField

      private static final long serialVersionUID = 1L;

      @Override
      protected void populateItem(ListItem<PivotField> item) {
        final IModel<PivotField> itemModel = item.getModel();
        final PivotField pivotField = itemModel.getObject();
        final PivotField.Area area = PivotAreaPanel.this.area;
        Label fieldLabel = new Label("field", new AbstractReadOnlyModel<String>() {

          private static final long serialVersionUID = 1L;

          @Override
          public String getObject() {
            String title = pivotField.getTitle();
            if (area.equals(PivotField.Area.DATA)) {
              title += " (" + pivotField.getCalculationDescription() + ")";
            }
           
            return title;
          }
         
        });
        if (pivotField.isNumber()) {
          item.add(AttributeModifier.append("class", "field-number"));
        }
                       
        // add field actions panel
        if (!area.equals(PivotField.Area.UNUSED)) {
          PivotFieldActionsPanel pivotFieldActionsPanel = new PivotFieldActionsPanel("dropDownPanel", Model.of(pivotField), Model.of(getPivotModel()));
          pivotFieldActionsPanel.setRenderBodyOnly(true);
          item.add(pivotFieldActionsPanel);
          String markupId = "dropdown-" + pivotField.getIndex();
          pivotFieldActionsPanel.get("dropdown").setMarkupId(markupId);
          fieldLabel.add(AttributeModifier.append("data-dropdown", "#" + markupId));
        } else {
          item.add(new EmptyPanel("dropDownPanel").setVisible(false));
        }
       
        item.add(fieldLabel);       
        item.setOutputMarkupId(true);
        item.setMarkupId("field-" + pivotField.getIndex());
      }
    };
    fieldsView.setOutputMarkupPlaceholderTag(true);
    fieldsContainer.add(fieldsView);
   
View Full Code Here

Examples of ro.fortsoft.wicket.pivot.PivotField

      @Override
      public void onSort(AjaxRequestTarget target, Item[] items) {
        PivotModel pivotModel = getPivotModel();
        for (Item item : items) {
          PivotField pivotField = pivotModel.getField(item.fieldIndex);
          pivotField.setArea(PivotField.Area.getValue(item.areaName));
          pivotField.setAreaIndex(item.sortIndex);
        }
        send(getPage(), Broadcast.BREADTH, new AreaChangedEvent(target));
      }
     
    };
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.