org.apache.wicket.markup.repeater
Class DefaultItemReuseStrategy
java.lang.Object
org.apache.wicket.markup.repeater.DefaultItemReuseStrategy
- All Implemented Interfaces:
- Serializable, IClusterable, IItemReuseStrategy
public class DefaultItemReuseStrategy
- extends Object
- implements IItemReuseStrategy
Implementation of IItemReuseStrategy
that returns new items every time.
- Author:
- Igor Vaynberg (ivaynberg)
- See Also:
IItemReuseStrategy
,
Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultItemReuseStrategy
public DefaultItemReuseStrategy()
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 interface IItemReuseStrategy
- 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)
Copyright © 2004-2011 Apache Software Foundation. All Rights Reserved.