Class DefaultItemReuseStrategy
- java.lang.Object
-
- org.apache.wicket.markup.repeater.DefaultItemReuseStrategy
-
- All Implemented Interfaces:
Serializable
,IItemReuseStrategy
,IClusterable
public class DefaultItemReuseStrategy extends Object implements IItemReuseStrategy
Implementation ofIItemReuseStrategy
that 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 IItemReuseStrategy
getInstance()
<T> Iterator<Item<T>>
getItems(IItemFactory<T> factory, Iterator<IModel<T>> newModels, Iterator<Item<T>> existingItems)
Returns an iterator over items that will be added to the view.
-
-
-
Constructor Detail
-
DefaultItemReuseStrategy
public DefaultItemReuseStrategy()
-
-
Method Detail
-
getInstance
public static IItemReuseStrategy getInstance()
- Returns:
- static instance of this strategy
-
getItems
public <T> Iterator<Item<T>> getItems(IItemFactory<T> factory, Iterator<IModel<T>> newModels, Iterator<Item<T>> existingItems)
Description copied from interface:IItemReuseStrategy
Returns 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:
getItems
in 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)
-
-