Class DefaultItemReuseStrategy
- java.lang.Object
-
- org.apache.wicket.markup.repeater.DefaultItemReuseStrategy
-
- All Implemented Interfaces:
java.io.Serializable,IItemReuseStrategy,org.apache.wicket.util.io.IClusterable
public class DefaultItemReuseStrategy extends java.lang.Object implements IItemReuseStrategy
Implementation ofIItemReuseStrategythat returns new items every time.- Author:
- Igor Vaynberg (ivaynberg)
- See Also:
IItemReuseStrategy, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DefaultItemReuseStrategy()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static IItemReuseStrategygetInstance()<T> java.util.Iterator<Item<T>>getItems(IItemFactory<T> factory, java.util.Iterator<IModel<T>> newModels, java.util.Iterator<Item<T>> existingItems)Returns an iterator over items that will be added to the view.
-
-
-
Method Detail
-
getInstance
public static IItemReuseStrategy getInstance()
- Returns:
- static instance of this strategy
-
getItems
public <T> java.util.Iterator<Item<T>> getItems(IItemFactory<T> factory, java.util.Iterator<IModel<T>> newModels, java.util.Iterator<Item<T>> existingItems)
Description copied from interface:IItemReuseStrategyReturns an iterator over items that will be added to the view. The iterator needs to return all the items because the old ones are removed prior to the new ones added.- Specified by:
getItemsin interfaceIItemReuseStrategy- Type Parameters:
T- type of Item- Parameters:
factory- implementation of IItemFactorynewModels- iterator over models for itemsexistingItems- iterator over child items- Returns:
- iterator over items that will be added after all the old items are moved.
- See Also:
IItemReuseStrategy.getItems(org.apache.wicket.markup.repeater.IItemFactory, java.util.Iterator, java.util.Iterator)
-
-