Package org.apache.wicket.examples.tree
Class FooProvider
- java.lang.Object
-
- org.apache.wicket.examples.tree.FooProvider
-
- All Implemented Interfaces:
Serializable,ITreeProvider<Foo>,IDetachable,IClusterable
public class FooProvider extends Object implements ITreeProvider<Foo>
A provider ofFoos. For simplicity all foos are kept as class members, in a real world scenario these would be fetched from a database. IfFoos wereSerializableyou could of course just keep references in instance variables.- Author:
- Sven Meier
- See Also:
model(Foo), Serialized Form
-
-
Constructor Summary
Constructors Constructor Description FooProvider()Construct.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddetach()Nothing to do.Iterator<Foo>getChildren(Foo foo)Iterator<Foo>getRoots()booleanhasChildren(Foo foo)IModel<Foo>model(Foo foo)Creates aFooProvider.FooModel.
-
-
-
Method Detail
-
detach
public void detach()
Nothing to do.- Specified by:
detachin interfaceIDetachable
-
getRoots
public Iterator<Foo> getRoots()
- Specified by:
getRootsin interfaceITreeProvider<Foo>
-
hasChildren
public boolean hasChildren(Foo foo)
- Specified by:
hasChildrenin interfaceITreeProvider<Foo>
-
getChildren
public Iterator<Foo> getChildren(Foo foo)
- Specified by:
getChildrenin interfaceITreeProvider<Foo>
-
-