Class RefreshingView<T>

    • Method Detail

      • newItemFactory

        protected IItemFactory<TnewItemFactory()
        Create a new IItemFactory based upon the RefreshingView
        An Item factory that delegates to the RefreshingView
      • getItemModels

        protected abstract Iterator<IModel<T>> getItemModels()
        Returns an iterator over models for items that will be added to this view
        an iterator over models for items that will be added to this view
      • populateItem

        protected abstract void populateItem​(Item<T> item)
        Populate the given Item container.

        be careful to add any components to the item and not the view itself. So, don't do:

         add(new Label("foo", "bar"));
         item.add(new Label("foo", "bar"));

        item - The item to populate
      • newItem

        protected Item<TnewItem​(String id,
                                  int index,
                                  IModel<T> model)
        Factory method for Item container. Item containers are simple MarkupContainer used to aggregate the user added components for a row inside the view.
        id - component id for the new data item
        index - the index of the new data item
        model - the model for the new data item
        DataItem created DataItem
        See Also:
      • getItems

        public Iterator<Item<T>> getItems()
        iterator over item instances that exist as children of this view
      • addItems

        protected void addItems​(Iterator<Item<T>> items)
        Add items to the view. Prior to this all items were removed so every request this function starts from a clean slate.
        items - item instances to be added to this view