Package org.apache.wicket.markup.repeater

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


      @SuppressWarnings({ "rawtypes", "unchecked" })
      @Override
      protected Item newCellItem(final String id, final int index, final IModel model)
      {
        Item item = DataTable.this.newCellItem(id, index, model);
        final IColumn<T> column = DataTable.this.columns.get(index);
        if (column instanceof IStyledColumn)
        {
          item.add(new DataTable.CssAttributeBehavior()
          {
            private static final long serialVersionUID = 1L;

            @Override
            protected String getCssClass()
View Full Code Here


  @SuppressWarnings("unchecked")
  @Override
  protected Item newItem(String id, int index, IModel model)
  {
    Item item = super.newItem(id, index, model);

    T object = (T) item.getModelObject();
    if (detachable)
    {
      BusinessObjectDetachableModel<T> detachableModel = new BusinessObjectDetachableModel<T>(
          object, serviceClazz);
      item.setModel(new CompoundPropertyModel(detachableModel));
    }
    else
    {
      item.setModel(new CompoundPropertyModel(object));
    }

    return item;
  }
View Full Code Here

          final ListItem item = (ListItem) component;
          return (item.getIndex() % 2 == 1) ? "even" : "odd";
        }
        else if (component instanceof Item)
        {
          final Item item = (Item) component;
          return (item.getIndex() % 2 == 1) ? "even" : "odd";
        }
        else
        {
          throw new HypotheseException("Type d'item non attendu.");
        }
View Full Code Here

        }

        @SuppressWarnings({"rawtypes", "unchecked"})
        @Override
        protected Item newCellItem(final String id, final int index, final IModel model) {
            Item item = EditableDataTable.this.newCellItem(id, index, model);
            final IColumn<R, U> column = (IColumn<R, U>) EditableDataTable.this.columns.get(index);
            if (column instanceof IStyledColumn) {
                item.add(new CssAttributeBehavior() {
                    private static final long serialVersionUID = 1L;

                    @Override
                    protected String getCssClass() {
                        return ((IStyledColumn<R, U>) column).getCssClass();
View Full Code Here

      @SuppressWarnings({ "rawtypes", "unchecked" })
      @Override
      protected Item newCellItem(final String id, final int index, final IModel model)
      {
        Item item = DataTable.this.newCellItem(id, index, model);
        final IColumn<T, S> column = DataTable.this.columns.get(index);
        if (column instanceof IStyledColumn)
        {
          item.add(new CssAttributeBehavior()
          {
            private static final long serialVersionUID = 1L;

            @Override
            protected String getCssClass()
View Full Code Here

   *
   * @return DataItem created DataItem
   */
  protected Item newCellItem(final String id, int index, final IModel model)
  {
    return new Item(id, index, model);
  }
View Full Code Here

   *
   * @return DataItem created DataItem
   */
  protected Item newRowItem(final String id, int index, final IModel model)
  {
    return new Item(id, index, model);
  }
View Full Code Here

    Iterator populators = getPopulatorsIterator();

    for (int i = 0; populators.hasNext(); i++)
    {
      IModel populatorModel = (IModel)populators.next();
      Item cellItem = newCellItem(cells.newChildId(), i, populatorModel);
      cells.add(cellItem);

      ICellPopulator populator = (ICellPopulator)cellItem.getModelObject();
      populator.populateItem(cellItem, CELL_ITEM_ID, item.getModel());

      if (cellItem.get("cell") == null)
      {
        throw new WicketRuntimeException(
            populator.getClass().getName() +
                ".populateItem() failed to add a component with id [" +
                CELL_ITEM_ID +
View Full Code Here

      private static final long serialVersionUID = 1L;

      @Override
      protected Item newCellItem(String id, int index, IModel model)
      {
        Item item = DataTable.this.newCellItem(id, index, model);
        final IColumn<T> column = DataTable.this.columns.get(index);
        if (column instanceof IStyledColumn)
        {
          item.add(new DataTable.CssAttributeBehavior()
          {
            private static final long serialVersionUID = 1L;

            @Override
            protected String getCssClass()
View Full Code Here

      private static final long serialVersionUID = 1L;

      @Override
      protected Item newCellItem(String id, int index, IModel model)
      {
        Item item = DataTable.this.newCellItem(id, index, model);
        final IColumn<?> column = DataTable.this.columns[index];
        if (column instanceof IStyledColumn)
        {
          item.add(new DataTable.CssAttributeBehavior()
          {
            private static final long serialVersionUID = 1L;

            @Override
            protected String getCssClass()
View Full Code Here

TOP

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

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.