Class LoopItem

All Implemented Interfaces:
Serializable, Iterable<Component>, IEventSink, IEventSource, IFeedbackContributor, IConverterLocator, IMetadataContext<Serializable,Component>, IHeaderContributor, IRequestableComponent, IHierarchical<Component>, IClusterable
Direct Known Subclasses:
ListItem

public class LoopItem extends AbstractItem
A very simple Item. Usually it is used as based class for more advanced Items.
Author:
Juergen Donnerstag
See Also:
  • Constructor Details

    • LoopItem

      public LoopItem(int index)
      Constructor
      Parameters:
      index - The index of the item
    • LoopItem

      public LoopItem(int index, IModel<?> model)
      A constructor which uses the index and the list provided to create a ListItem. This constructor is the default one.
      Parameters:
      index - The index of the item
      model - The model object of the item
    • LoopItem

      public LoopItem(String id, int index, IModel<?> model)
      Constructor
      Parameters:
      id - component id
      index - relative index of this item in the pageable view
      model - model for this item
    • LoopItem

      public LoopItem(String id, int index)
      Constructor
      Parameters:
      id - component id
      index - relative index of this item in the pageable view
  • Method Details

    • getIndex

      public final int getIndex()
      Gets the index of the listItem in the parent listView.
      Returns:
      The index of this listItem in the parent listView
    • setIndex

      public final void setIndex(int index)
      Sets the index of this item
      Parameters:
      index - new index