public class ChildNodeProvider extends AbstractProvider<javax.jcr.Node,JcrNodeModel>
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.elements
Constructor and Description |
---|
ChildNodeProvider(IFieldDescriptor descriptor,
JcrNodeModel prototype,
JcrItemModel<javax.jcr.Node> itemModel) |
Modifier and Type | Method and Description |
---|---|
void |
addNew()
Add a new element.
|
void |
detach() |
IFieldDescriptor |
getDescriptor() |
ModelPathElement |
getFieldElement(JcrNodeModel model)
Retrieve the
ModelPathElement to access an element. |
protected void |
loadElements()
Method to be overridden by subclasses, to populate the list of elements.
|
void |
moveUp(JcrNodeModel model)
Move a model up one position.
|
void |
remove(JcrNodeModel model)
Remove a model from the list.
|
iterator, load, refresh, setChainedModel, size
getChainedModel, getItemModel, getObject, setObject
public ChildNodeProvider(IFieldDescriptor descriptor, JcrNodeModel prototype, JcrItemModel<javax.jcr.Node> itemModel)
public IFieldDescriptor getDescriptor()
public void detach()
detach
in interface org.apache.wicket.model.IDetachable
detach
in class AbstractProvider<javax.jcr.Node,JcrNodeModel>
public void addNew()
AbstractProvider
addNew
in class AbstractProvider<javax.jcr.Node,JcrNodeModel>
public void remove(JcrNodeModel model)
AbstractProvider
remove
in class AbstractProvider<javax.jcr.Node,JcrNodeModel>
model
- the model to removepublic void moveUp(JcrNodeModel model)
AbstractProvider
moveUp
in class AbstractProvider<javax.jcr.Node,JcrNodeModel>
model
- the model to movepublic ModelPathElement getFieldElement(JcrNodeModel model)
AbstractProvider
ModelPathElement
to access an element.getFieldElement
in class AbstractProvider<javax.jcr.Node,JcrNodeModel>
model
- the element to be made accessibleprotected void loadElements()
AbstractProvider
loadElements
in class AbstractProvider<javax.jcr.Node,JcrNodeModel>
Copyright © 2007–2016 Hippo B.V. (http://www.onehippo.com). All rights reserved.