|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.wicket.examples.tree.FooProvider
public class FooProvider
A provider of Foo
s.
For simplicity all foos are kept as class members, in a real world scenario these would be
fetched from a database. If Foo
s were Serializable
you could of course just keep
references in instance variables.
model(Foo)
,
Serialized FormConstructor Summary | |
---|---|
FooProvider()
Construct. |
Method Summary | |
---|---|
void |
detach()
Nothing to do. |
Iterator<Foo> |
getChildren(Foo foo)
Get the children of the given node. |
Iterator<Foo> |
getRoots()
Get the roots of the tree. |
boolean |
hasChildren(Foo foo)
Does the given object have children - note that this method may return true even
if ITreeProvider.getChildren(Object) returns an empty iterator. |
IModel<Foo> |
model(Foo foo)
Creates a FooModel . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FooProvider()
Method Detail |
---|
public void detach()
detach
in interface IDetachable
public Iterator<Foo> getRoots()
ITreeProvider
getRoots
in interface ITreeProvider<Foo>
public boolean hasChildren(Foo foo)
ITreeProvider
true
even
if ITreeProvider.getChildren(Object)
returns an empty iterator.
hasChildren
in interface ITreeProvider<Foo>
foo
- the node to check for children
true
if node has childrenpublic Iterator<Foo> getChildren(Foo foo)
ITreeProvider
getChildren
in interface ITreeProvider<Foo>
foo
- node to get children for
public IModel<Foo> model(Foo foo)
FooModel
.
model
in interface ITreeProvider<Foo>
foo
- the object that needs to be wrapped
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |