T - tree model object typeI - node model object typepublic class TreeGrid<T extends TreeModel & Serializable,I extends TreeNode & Serializable,S> extends AbstractGrid<T,I,S>
CSS, INTERNAL_TOOLBAR_ITEM_ID, JS_DOM, JS_EVENT, JS_SCRIPT, JS_SCRIPT_JQ, JS_YAHOO, THEME_VISTAENABLE, FLAG_AFTER_RENDERING, FLAG_INITIALIZED, FLAG_PREPARED_FOR_RENDER, FLAG_REMOVING_FROM_HIERARCHY, FLAG_RESERVED1, FLAG_RESERVED2, FLAG_RESERVED3, FLAG_RESERVED4, FLAG_RESERVED5, FLAG_RESERVED8, PARENT_PATH, PATH_SEPARATOR, RENDER, RFLAG_CONTAINER_DEQUEING| Constructor and Description |
|---|
TreeGrid(String id,
org.apache.wicket.model.IModel<T> model,
List<IGridColumn<T,I,S>> columns)
Creates a new
TreeGrid instance. |
TreeGrid(String id,
T model,
List<IGridColumn<T,I,S>> columns)
Creates a new
TreeGrid instance. |
| Modifier and Type | Method and Description |
|---|---|
org.apache.wicket.markup.html.WebMarkupContainer |
findParentRow(org.apache.wicket.Component child)
Returns the row in DataTable that contains the child component
|
protected org.apache.wicket.markup.html.WebMarkupContainer |
findRowComponent(org.apache.wicket.model.IModel<I> rowModel)
Returns the row component for specified item.
|
Collection<org.apache.wicket.model.IModel<I>> |
getSelectedItems()
Returns the collection of models of all currently selected items.
|
org.apache.wicket.extensions.markup.html.tree.AbstractTree |
getTree()
Returns the inner tree of the
TreeGrid. |
org.apache.wicket.extensions.markup.html.tree.ITreeState |
getTreeState()
Returns the tree state
|
boolean |
isAllowSelectMultiple()
Returns whether user will be able to select more than one item at a time.
|
boolean |
isAutoSelectChildren()
Returns whether children of selected nodes should be automatically treated as selected node.
|
boolean |
isItemSelected(org.apache.wicket.model.IModel<I> itemModel)
Queries whether the item specified by itemModel is currently selected.
|
void |
markItemDirty(org.apache.wicket.model.IModel<I> model)
Marks the item from the given model as dirty.
|
protected void |
onJunctionLinkClicked(org.apache.wicket.ajax.AjaxRequestTarget target,
Object node)
Callback function called after user clicked on an junction link.
|
void |
resetSelectedItems()
Deselects all items.
|
void |
selectAllVisibleItems()
Marks all currently displayed items as selected.
|
void |
selectItem(org.apache.wicket.model.IModel<I> itemModel,
boolean selected)
Alters the selection state of item specified by the item model.
|
void |
setAllowSelectMultiple(boolean value)
Sets whether user will be able to select more than one item.
|
void |
setAutoSelectChildren(boolean autoSelectChildren)
Sets whether children of selected node should automatically be treated as selected nodes
(default
true). |
void |
update()
During Ajax request updates the changed parts of tree.
|
addBottomToolbar, addHeaderToolbar, addTopToolbar, cleanLastClickedColumn, columnSanityCheck, disableRowClickNotifications, getActiveColumns, getAllColumns, getColumnState, getContentHeight, getContentHeightSizeUnit, getForm, getLastClickedColumn, getSortState, getTheme, isClickRowToDeselect, isClickRowToSelect, isItemEdited, isSelectToEdit, isUseYui, onAfterRender, onBeforeRender, onCellClicked, onColumnStateChanged, onComponentTag, onInitialize, onItemSelectionChanged, onRowClicked, onRowPopulated, onSortStateChanged, renderHead, setClickRowToDeselect, setClickRowToSelect, setColumnState, setContentHeight, setItemEdit, setSelectToEdit, setTheme, setUseYuigetRegionMarkup, newMarkupSourcingStrategygetWebPage, getWebRequest, getWebResponse, getWebSessionadd, addDequeuedComponent, addOrReplace, autoAdd, canDequeueTag, contains, dequeue, dequeue, dequeuePreamble, findComponentToDequeue, get, get, getAssociatedMarkup, getAssociatedMarkupStream, getMarkup, getMarkupType, internalAdd, internalInitialize, iterator, iterator, newDequeueContext, onAfterRenderChildren, onComponentTagBody, onDetach, onRender, queue, remove, remove, removeAll, renderAll, renderAssociatedMarkup, renderNext, replace, setDefaultModel, size, swap, toString, toString, visitChildren, visitChildren, visitChildren, visitChildrenadd, addStateChange, afterRender, beforeRender, canCallListenerInterface, canCallListenerInterfaceAfterExpiry, checkComponentTag, checkComponentTagAttribute, checkHierarchyChange, clearOriginalDestination, configure, continueToOriginalDestination, debug, detach, detachModel, detachModels, determineVisibility, error, exceptionMessage, fatal, findMarkupStream, findPage, findParent, findParentWithAssociatedMarkup, getAjaxRegionMarkupId, getApplication, getBehaviorById, getBehaviorId, getBehaviors, getBehaviors, getClassRelativePath, getConverter, getDefaultModel, getDefaultModelObject, getDefaultModelObjectAsString, getDefaultModelObjectAsString, getEscapeModelStrings, getFeedbackMessages, getFlag, getId, getInnermostModel, getInnermostModel, getLocale, getLocalizer, getMarkup, getMarkupAttributes, getMarkupId, getMarkupId, getMarkupIdFromMarkup, getMarkupIdImpl, getMarkupSourcingStrategy, getMetaData, getModelComparator, getOutputMarkupId, getOutputMarkupPlaceholderTag, getPage, getPageRelativePath, getParent, getPath, getRenderBodyOnly, getRequest, getRequestCycle, getRequestFlag, getResponse, getSession, getSizeInBytes, getStatelessHint, getString, getString, getString, getStyle, getVariation, hasBeenRendered, hasErrorMessage, hasFeedbackMessage, info, initModel, internalOnModelChanged, internalPrepareForRender, internalRenderComponent, internalRenderHead, isActionAuthorized, isAuto, isBehaviorAccepted, isEnableAllowed, isEnabled, isEnabledInHierarchy, isIgnoreAttributeModifier, isRenderAllowed, isStateless, isVersioned, isVisibilityAllowed, isVisible, isVisibleInHierarchy, markRendering, modelChanged, modelChanging, onConfigure, onEvent, onModelChanged, onModelChanging, onReAdd, onRemove, prepareForRender, redirectToInterceptPage, remove, remove, render, renderComponentTag, rendered, renderHead, renderPlaceholderTag, replaceComponentTagBody, replaceWith, sameInnermostModel, sameInnermostModel, send, setAuto, setDefaultModelObject, setEnabled, setEscapeModelStrings, setFlag, setIgnoreAttributeModifier, setMarkup, setMarkupId, setMarkupIdImpl, setMetaData, setOutputMarkupId, setOutputMarkupPlaceholderTag, setParent, setRenderBodyOnly, setRequestFlag, setResponsePage, setResponsePage, setResponsePage, setVersioned, setVisibilityAllowed, setVisible, success, urlFor, urlFor, urlFor, urlFor, urlFor, visitParents, visitParents, warn, wrappublic TreeGrid(String id, org.apache.wicket.model.IModel<T> model, List<IGridColumn<T,I,S>> columns)
TreeGrid instance.id - component idmodel - model used to access the TreeModelcolumns - list of IGridColumns.public TreeGrid(String id, T model, List<IGridColumn<T,I,S>> columns)
TreeGrid instance.id - component idmodel - tree modelcolumns - list of IGridColumns.public org.apache.wicket.extensions.markup.html.tree.AbstractTree getTree()
TreeGrid.public org.apache.wicket.extensions.markup.html.tree.ITreeState getTreeState()
public final void update()
update in class AbstractGrid<T extends TreeModel & Serializable,I extends TreeNode & Serializable,S>protected void onJunctionLinkClicked(org.apache.wicket.ajax.AjaxRequestTarget target,
Object node)
target - Request target - may be null on non-ajax callnode - Node for which this callback is relevantpublic Collection<org.apache.wicket.model.IModel<I>> getSelectedItems()
getSelectedItems in class AbstractGrid<T extends TreeModel & Serializable,I extends TreeNode & Serializable,S>public boolean isAllowSelectMultiple()
isAllowSelectMultiple in class AbstractGrid<T extends TreeModel & Serializable,I extends TreeNode & Serializable,S>true if multiple items can be selected at a time, false
otherwise.public void setAllowSelectMultiple(boolean value)
setAllowSelectMultiple in class AbstractGrid<T extends TreeModel & Serializable,I extends TreeNode & Serializable,S>value - true if the user will be able to select more than one item at a time,
false otherwise (single selection mode).public boolean isItemSelected(org.apache.wicket.model.IModel<I> itemModel)
isItemSelected in class AbstractGrid<T extends TreeModel & Serializable,I extends TreeNode & Serializable,S>itemModel - item modeltrue if the item is selected, false otherwisepublic void resetSelectedItems()
resetSelectedItems in class AbstractGrid<T extends TreeModel & Serializable,I extends TreeNode & Serializable,S>public void selectAllVisibleItems()
DataGrid this selects all items
on current page, for TreeGrid this selects all currently visible nodes.selectAllVisibleItems in class AbstractGrid<T extends TreeModel & Serializable,I extends TreeNode & Serializable,S>protected org.apache.wicket.markup.html.WebMarkupContainer findRowComponent(org.apache.wicket.model.IModel<I> rowModel)
AbstractGridfindRowComponent in class AbstractGrid<T extends TreeModel & Serializable,I extends TreeNode & Serializable,S>public void markItemDirty(org.apache.wicket.model.IModel<I> model)
AbstractGridAbstractGrid.update() method is called.markItemDirty in class AbstractGrid<T extends TreeModel & Serializable,I extends TreeNode & Serializable,S>model - model used to access the itempublic void selectItem(org.apache.wicket.model.IModel<I> itemModel, boolean selected)
selectItem in class AbstractGrid<T extends TreeModel & Serializable,I extends TreeNode & Serializable,S>itemModel - item modelselected - true if the item should be selected, false otherwise.public org.apache.wicket.markup.html.WebMarkupContainer findParentRow(org.apache.wicket.Component child)
AbstractGridfindParentRow in class AbstractGrid<T extends TreeModel & Serializable,I extends TreeNode & Serializable,S>public void setAutoSelectChildren(boolean autoSelectChildren)
true). Such children can not be deselected individually. Also
ITreeState.isNodeSelected(Object) returns true if any of node parent is
selected. On the contrary, ITreeState.getSelectedNodes() only returns "top level"
selected nodes.autoSelectChildren - public boolean isAutoSelectChildren()
Copyright © 2015. All rights reserved.