Package org.apache.wicket.markup.repeater

Examples of org.apache.wicket.markup.repeater.RepeatingView


      do
      {
        // Build a row
        Item<?> rowItem = newRowItem(newChildId(), row);
        RepeatingView rowView = new RepeatingView("cols");
        rowItem.add(rowView);
        add(rowItem);

        // Populate the row
        for (int index = 0; index < cols; index++)
        {
          final Item<T> cellItem;
          if (items.hasNext())
          {
            cellItem = items.next();
          }
          else
          {
            cellItem = newEmptyItem(newChildId(), index);
            populateEmptyItem(cellItem);
          }
          rowView.add(cellItem);
        }

        // increase row
        row++;
View Full Code Here


     * @param id
     */
    private ToolbarsContainer(final String id)
    {
      super(id);
      toolbars = new RepeatingView("toolbars");
      add(toolbars);
    }
View Full Code Here

        rolesCheckGroup.add(roles);
        return rolesCheckGroup;
    }

    private RepeatingView createRolesRepeater(IModel<Set<Role>> rolesModel) {
        RepeatingView rolesRepeater = new RepeatingView("rolesRepeater");
        Set<Role> roles = rolesModel.getObject();
        for (Role role : roles) {
            WebMarkupContainer roleItem = new WebMarkupContainer(rolesRepeater.newChildId());
            rolesRepeater.add(roleItem);
            roleItem.add(new Label("roleName", "[" + role.toString() + "]"));
//            //MZA: WebMarkupContainer could be removed when ugly hack with " " was used
//            rolesRepeater.add(new Label(rolesRepeater.newChildId(), role + " "));
        }
        return rolesRepeater;
View Full Code Here

  public RepeatingView getRepeatingView(String path)
  {
    Page renderedPage = getLastRenderedPage();
    assertComponent(path, RepeatingView.class);
    RepeatingView rv = (RepeatingView) renderedPage.get(path);
    return rv;
  }
View Full Code Here

      }
    });

    form.add(new Button("change"));

    RepeatingView examples = new RepeatingView("examples");
    examples.add(new LabelExample(examples.newChildId()));
    examples.add(new ListsExample(examples.newChildId()));
    examples.add(new TableExample(examples.newChildId()));
    examples.add(new TreeExample(examples.newChildId()));
    examples.add(new TableTreeExample(examples.newChildId()));
    form.add(examples);
  }
View Full Code Here

   * @see org.apache.wicket.markup.repeater.RefreshingView#populateItem(org.apache.wicket.markup.repeater.Item)
   */
  @Override
  protected final void populateItem(final Item<T> item)
  {
    RepeatingView cells = new RepeatingView(CELL_REPEATER_ID);
    item.add(cells);

    int populatorsNumber = populators.size();
    for (int i = 0; i < populatorsNumber; i++)
    {
      ICellPopulator<T> populator = populators.get(i);
      IModel<ICellPopulator<T>> populatorModel = new Model<>(populator);
      Item<ICellPopulator<T>> cellItem = newCellItem(cells.newChildId(), i, populatorModel);
      cells.add(cellItem);

      populator.populateItem(cellItem, CELL_ITEM_ID, item.getModel());

      if (cellItem.get("cell") == null)
      {
View Full Code Here

     * @param id
     */
    private ToolbarsContainer(final String id)
    {
      super(id);
      toolbars = new RepeatingView("toolbars");
      add(toolbars);
    }
View Full Code Here

  public ColGroup(String id)
  {
    super(id);

    this.colgroupCols = new RepeatingView("col");
    add(colgroupCols);
  }
View Full Code Here

      }
    }));

    td.add(new Label("exportTo", messageModel));

    RepeatingView linkContainers = new RepeatingView("linkContainer");
    td.add(linkContainers);

    for (IDataExporter exporter : dataExporters)
    {
      WebMarkupContainer span = new WebMarkupContainer(linkContainers.newChildId());
      linkContainers.add(span);

      span.add(createExportLink("exportLink", exporter));
    }
  }
View Full Code Here

     * @param id
     */
    private ToolbarsContainer(final String id)
    {
      super(id);
      toolbars = new RepeatingView("toolbars");
      add(toolbars);
    }
View Full Code Here

TOP

Related Classes of org.apache.wicket.markup.repeater.RepeatingView

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.