Package org.hippoecm.frontend.model
Class ChildNodeProvider
java.lang.Object
org.hippoecm.frontend.model.ItemModelWrapper<T>
org.hippoecm.frontend.model.AbstractProvider<Node,JcrNodeModel>
org.hippoecm.frontend.model.ChildNodeProvider
- All Implemented Interfaces:
Serializable
,org.apache.wicket.model.IDetachable
,org.apache.wicket.model.IModel<Node>
,org.apache.wicket.util.io.IClusterable
An
IDataProvider
that provides a list of models for child nodes, based
on a IFieldDescriptor
and a JcrNodeModel
. A prototype is used to
add new child nodes.- See Also:
-
Field Summary
Fields inherited from class org.hippoecm.frontend.model.AbstractProvider
elements
-
Constructor Summary
ConstructorDescriptionChildNodeProvider
(IFieldDescriptor descriptor, JcrNodeModel prototype, JcrItemModel<Node> itemModel) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addNew()
Add a new element.void
detach()
getFieldElement
(JcrNodeModel model) Retrieve theModelPathElement
to access an element.protected void
Method to be overridden by subclasses, to populate the list of elements.void
moveToBottom
(JcrNodeModel model) Move a model to the bottom of the list.void
moveToTop
(JcrNodeModel model) Move a model to the top of the list.void
moveUp
(JcrNodeModel model) Move a model up one position.void
remove
(JcrNodeModel model) Remove a model from the list.Methods inherited from class org.hippoecm.frontend.model.AbstractProvider
iterator, load, refresh, setItemModel, size
Methods inherited from class org.hippoecm.frontend.model.ItemModelWrapper
getItemModel, getObject, setObject
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.wicket.model.IModel
as, combineWith, filter, flatMap, isPresent, map, orElse, orElseGet
-
Constructor Details
-
ChildNodeProvider
public ChildNodeProvider(IFieldDescriptor descriptor, JcrNodeModel prototype, JcrItemModel<Node> itemModel)
-
-
Method Details
-
getDescriptor
-
detach
public void detach()- Specified by:
detach
in interfaceorg.apache.wicket.model.IDetachable
- Specified by:
detach
in interfaceorg.apache.wicket.model.IModel<Node>
- Overrides:
detach
in classAbstractProvider<Node,
JcrNodeModel>
-
addNew
public void addNew()Description copied from class:AbstractProvider
Add a new element.- Specified by:
addNew
in classAbstractProvider<Node,
JcrNodeModel>
-
remove
Description copied from class:AbstractProvider
Remove a model from the list.- Specified by:
remove
in classAbstractProvider<Node,
JcrNodeModel> - Parameters:
model
- the model to remove
-
moveUp
Description copied from class:AbstractProvider
Move a model up one position.- Specified by:
moveUp
in classAbstractProvider<Node,
JcrNodeModel> - Parameters:
model
- the model to move
-
moveToTop
Description copied from class:AbstractProvider
Move a model to the top of the list.- Specified by:
moveToTop
in classAbstractProvider<Node,
JcrNodeModel> - Parameters:
model
- the model to move
-
moveToBottom
Description copied from class:AbstractProvider
Move a model to the bottom of the list.- Specified by:
moveToBottom
in classAbstractProvider<Node,
JcrNodeModel> - Parameters:
model
- the model to move
-
getFieldElement
Description copied from class:AbstractProvider
Retrieve theModelPathElement
to access an element.- Specified by:
getFieldElement
in classAbstractProvider<Node,
JcrNodeModel> - Parameters:
model
- the element to be made accessible- Returns:
- the ModelPathElement for the element
-
loadElements
protected void loadElements()Description copied from class:AbstractProvider
Method to be overridden by subclasses, to populate the list of elements.- Specified by:
loadElements
in classAbstractProvider<Node,
JcrNodeModel>
-