Module org.apache.wicket.core
Class DefaultItemReuseStrategy
java.lang.Object
org.apache.wicket.markup.repeater.DefaultItemReuseStrategy
- All Implemented Interfaces:
Serializable
,IItemReuseStrategy
,IClusterable
Implementation of
IItemReuseStrategy
that returns new items every time.- Author:
- Igor Vaynberg (ivaynberg)
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic IItemReuseStrategy
Returns an iterator over items that will be added to the view.
-
Constructor Details
-
DefaultItemReuseStrategy
public DefaultItemReuseStrategy()
-
-
Method Details
-
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:
-