org.apache.wicket.markup.repeater
Class DefaultItemReuseStrategy

java.lang.Object
  extended by org.apache.wicket.markup.repeater.DefaultItemReuseStrategy
All Implemented Interfaces:
java.io.Serializable, IClusterable, IItemReuseStrategy

public class DefaultItemReuseStrategy
extends java.lang.Object
implements IItemReuseStrategy

Implementation of IItemReuseStrategy that returns new items every time.

Author:
Igor Vaynberg (ivaynberg)
See Also:
IItemReuseStrategy, Serialized Form

Constructor Summary
DefaultItemReuseStrategy()
           
 
Method Summary
static IItemReuseStrategy getInstance()
           
 java.util.Iterator getItems(IItemFactory factory, java.util.Iterator newModels, java.util.Iterator existingItems)
          Returns an iterator over items that will be added to the view.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultItemReuseStrategy

public DefaultItemReuseStrategy()
Method Detail

getInstance

public static IItemReuseStrategy getInstance()
Returns:
static instance of this strategy

getItems

public java.util.Iterator getItems(IItemFactory factory,
                                   java.util.Iterator newModels,
                                   java.util.Iterator 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
Parameters:
factory - implementation of IItemFactory
newModels - iterator over models for items
existingItems - iterator over child items
Returns:
iterator over items that will be added after all the old items are moved.
See Also:
IItemReuseStrategy.getItems(IItemFactory, java.util.Iterator, java.util.Iterator)


Copyright © 2004-2010 Apache Software Foundation. All Rights Reserved.