|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.wicket.Component
org.apache.wicket.MarkupContainer
org.apache.wicket.markup.html.WebMarkupContainer
org.apache.wicket.markup.html.WebMarkupContainerWithAssociatedMarkup
org.apache.wicket.markup.html.panel.Panel
org.apache.wicket.markup.html.tree.AbstractTree
org.apache.wicket.markup.html.tree.BaseTree
org.apache.wicket.markup.html.tree.LabelTree
public class LabelTree
Simple tree component that uses label to render tree node.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.apache.wicket.markup.html.tree.BaseTree |
---|
BaseTree.ILinkCallback, BaseTree.LinkType |
Nested classes/interfaces inherited from class org.apache.wicket.Component |
---|
Component.ComponentModelChange, Component.EnabledChange, Component.IVisitor<T extends Component>, Component.VisibilityChange |
Field Summary |
---|
Fields inherited from class org.apache.wicket.Component |
---|
ENABLE, FLAG_CONFIGURED, FLAG_INITIALIZED, FLAG_REMOVING_FROM_HIERARCHY, FLAG_RESERVED1, FLAG_RESERVED2, FLAG_RESERVED3, FLAG_RESERVED4, FLAG_RESERVED5, FLAG_RESERVED6, FLAG_RESERVED7, FLAG_RESERVED8, PARENT_PATH, PATH_SEPARATOR, RENDER |
Constructor Summary | |
---|---|
LabelTree(String id)
Construct. |
|
LabelTree(String id,
IModel<TreeModel> model)
Construct. |
|
LabelTree(String id,
TreeModel model)
Construct. |
Method Summary | |
---|---|
protected IModel<Object> |
getNodeTextModel(IModel<Object> nodeModel)
Provides the model that will be used to feed the node text. |
protected Component |
newNodeComponent(String id,
IModel<Object> model)
Creates a new component for the given TreeNode. |
Methods inherited from class org.apache.wicket.markup.html.tree.BaseTree |
---|
getCSS, getItemClass, getLinkType, getSelectedClass, isForceRebuildOnSelectionChange, newJunctionLink, newLink, onJunctionLinkClicked, populateTreeItem, setLinkType |
Methods inherited from class org.apache.wicket.markup.html.tree.AbstractTree |
---|
addComponent, allNodesCollapsed, allNodesExpanded, getChildAt, getChildCount, getModel, getModelObject, getNodeComponent, getParentNode, getTreeState, invalidateAll, isLeaf, isNodeExpanded, isRootLess, markNodeChildrenDirty, markNodeDirty, newTreeState, nodeChildren, nodeCollapsed, nodeExpanded, nodeSelected, nodeUnselected, onAfterRender, onBeforeAttach, onBeforeRender, onDetach, onTargetRespond, setModel, setModelObject, setRootLess, treeNodesChanged, treeNodesInserted, treeNodesRemoved, treeStructureChanged, updateTree, updateTree |
Methods inherited from class org.apache.wicket.markup.html.panel.Panel |
---|
onComponentTag, onComponentTagBody, renderHead |
Methods inherited from class org.apache.wicket.markup.html.WebMarkupContainerWithAssociatedMarkup |
---|
newHeaderPartContainer, renderHeadFromAssociatedMarkupFile |
Methods inherited from class org.apache.wicket.markup.html.WebMarkupContainer |
---|
getMarkupType, getWebPage, getWebRequest |
Methods inherited from class org.apache.wicket.MarkupContainer |
---|
add, addOrReplace, autoAdd, autoAdd, contains, findMarkupStream, get, get, getAssociatedMarkupStream, getMarkupStream, hasAssociatedMarkup, internalAdd, isTransparentResolver, iterator, iterator, newMarkupResourceStream, onAfterRenderChildren, onRender, remove, remove, removeAll, renderAll, renderAssociatedMarkup, renderComponentTagBody, renderNext, replace, setDefaultModel, setMarkupStream, size, swap, toString, toString, visitChildren, visitChildren |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public LabelTree(String id)
id
- public LabelTree(String id, IModel<TreeModel> model)
id
- model
- model that provides the TreeModel
public LabelTree(String id, TreeModel model)
id
- model
- Tree modelMethod Detail |
---|
protected Component newNodeComponent(String id, IModel<Object> model)
BaseTree
newNodeComponent
in class BaseTree
id
- component IDmodel
- model that returns the node
BaseTree.newNodeComponent(java.lang.String,
org.apache.wicket.model.IModel)
protected IModel<Object> getNodeTextModel(IModel<Object> nodeModel)
return new PropertyModel(nodeModel, "object.name");
which will translate to YourTreeNodeSubclass.getObject().getName();
NOTE: remember that the nodeModel represents the TreeNode object, not the model object inside
it
NOTE: this method is called from the default implementation of
newNodeComponent(String, IModel)
, so if it is subclassed this method may no longer
be called unless the subclassing code maintains the callback explicitly
nodeModel
- model representing the current tree node
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |