java.lang.Object
org.apache.wicket.Component
org.apache.wicket.MarkupContainer
org.apache.wicket.markup.html.WebMarkupContainer
org.apache.wicket.markup.html.panel.Panel
org.apache.wicket.extensions.markup.html.repeater.tree.AbstractTree<T>
org.apache.wicket.extensions.markup.html.repeater.tree.TableTree<T,S>
Type Parameters:
T - The model object type
S - the type of the sort property
All Implemented Interfaces:
Serializable, Iterable<org.apache.wicket.Component>, org.apache.wicket.event.IEventSink, org.apache.wicket.event.IEventSource, org.apache.wicket.feedback.IFeedbackContributor, org.apache.wicket.IConverterLocator, org.apache.wicket.IGenericComponent<Set<T>,AbstractTree<T>>, org.apache.wicket.IMetadataContext<Serializable,org.apache.wicket.Component>, org.apache.wicket.IQueueRegion, org.apache.wicket.markup.html.IHeaderContributor, org.apache.wicket.request.component.IRequestableComponent, org.apache.wicket.util.IHierarchical<org.apache.wicket.Component>, org.apache.wicket.util.io.IClusterable
Direct Known Subclasses:
DefaultTableTree

public abstract class TableTree<T,S> extends AbstractTree<T>
A tree with tabular markup.
Author:
svenmeier
See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.apache.wicket.extensions.markup.html.repeater.tree.AbstractTree

    AbstractTree.State
  • Field Summary

    Fields inherited from class org.apache.wicket.markup.html.panel.Panel

    PANEL

    Fields inherited from class org.apache.wicket.Component

    ENABLE, FLAG_INITIALIZED, FLAG_RESERVED1, FLAG_RESERVED2, FLAG_RESERVED3, FLAG_RESERVED4, FLAG_RESERVED5, FLAG_RESERVED8, PARENT_PATH, PATH_SEPARATOR, RENDER, RFLAG_CONTAINER_DEQUEING, RFLAG_CONTAINER_HAS_REMOVALS
  • Constructor Summary

    Constructors
    Constructor
    Description
    TableTree(String id, List<? extends IColumn<T,S>> columns, ITreeProvider<T> dataProvider, long rowsPerPage)
    Constructor
    TableTree(String id, List<? extends IColumn<T,S>> columns, ITreeProvider<T> provider, long rowsPerPage, org.apache.wicket.model.IModel<? extends Set<T>> state)
    Constructor
  • Method Summary

    Modifier and Type
    Method
    Description
    Get the nested table.
    protected ITreeDataProvider<T>
    Hook method to create an ITreeDataProvider.
    protected DataTable<T,S>
    newDataTable(String id, List<? extends IColumn<T,S>> columns, org.apache.wicket.markup.repeater.data.IDataProvider<T> dataProvider, long rowsPerPage)
    Factory method for the wrapped DataTable.
    protected org.apache.wicket.markup.repeater.Item<T>
    newRowItem(String id, int index, org.apache.wicket.model.IModel<T> model)
    Create a row item for the nested DataTable.
    final TableTree<T,S>
    setItemReuseStrategy(org.apache.wicket.markup.repeater.IItemReuseStrategy strategy)
    Sets the item reuse strategy.
    void
    updateBranch(T node, org.apache.wicket.core.request.handler.IPartialPageRequestHandler target)
    For updating of a single branch the whole table is added to the ART.
    void
    updateNode(T t, org.apache.wicket.core.request.handler.IPartialPageRequestHandler target)
    For an update of a node the complete row item is added to the ART.

    Methods inherited from class org.apache.wicket.extensions.markup.html.repeater.tree.AbstractTree

    collapse, expand, getItemReuseStrategy, getProvider, getState, initModel, newContentComponent, newModel, newNodeComponent, onDetach

    Methods inherited from class org.apache.wicket.markup.html.panel.Panel

    getRegionMarkup, newMarkupSourcingStrategy

    Methods inherited from class org.apache.wicket.markup.html.WebMarkupContainer

    getWebApplication, getWebPage, getWebRequest, getWebResponse, getWebSession

    Methods inherited from class org.apache.wicket.MarkupContainer

    add, addDequeuedComponent, addOrReplace, autoAdd, canDequeueTag, contains, dequeue, dequeue, dequeuePreamble, findChildComponent, findComponentToDequeue, get, getAssociatedMarkup, getAssociatedMarkupStream, getMarkup, getMarkupType, internalAdd, internalInitialize, iterator, iterator, newDequeueContext, onComponentTagBody, onInitialize, onRender, queue, remove, remove, removeAll, renderAll, renderAssociatedMarkup, renderNext, replace, setDefaultModel, size, stream, streamChildren, toString, toString, visitChildren, visitChildren

    Methods inherited from class org.apache.wicket.Component

    add, addStateChange, beforeRender, canCallListener, canCallListenerAfterExpiry, checkComponentTag, checkComponentTagAttribute, checkHierarchyChange, clearOriginalDestination, configure, continueToOriginalDestination, createConverter, 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, getMarkupTag, 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, internalOnModelChanged, internalRenderComponent, internalRenderHead, isActionAuthorized, isAuto, isBehaviorAccepted, isEnableAllowed, isEnabled, isEnabledInHierarchy, isIgnoreAttributeModifier, isInitialized, isRenderAllowed, isRendering, isStateless, isVersioned, isVisibilityAllowed, isVisible, isVisibleInHierarchy, markRendering, modelChanged, modelChanging, onAfterRender, onBeforeRender, onComponentTag, onConfigure, onEvent, onModelChanged, onModelChanging, onReAdd, onRemove, redirectToInterceptPage, remove, remove, render, renderComponentTag, rendered, renderHead, renderPart, renderPlaceholderTag, replaceComponentTagBody, replaceWith, sameInnermostModel, sameInnermostModel, send, setAuto, setDefaultModelObject, setEnabled, setEscapeModelStrings, setFlag, setIgnoreAttributeModifier, setMarkup, setMarkupId, setMarkupIdImpl, setMetaData, setOutputMarkupId, setOutputMarkupPlaceholderTag, setParent, setRenderBodyOnly, setResponsePage, setResponsePage, setResponsePage, setVersioned, setVisibilityAllowed, setVisible, success, urlFor, urlFor, urlFor, urlForListener, urlForListener, visitParents, visitParents, warn, wrap

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.apache.wicket.IGenericComponent

    getDefaultModel, getDefaultModelObject, getModel, getModelObject, setDefaultModel, setDefaultModelObject, setModel, setModelObject

    Methods inherited from interface org.apache.wicket.IQueueRegion

    dequeue, newDequeueContext

    Methods inherited from interface java.lang.Iterable

    forEach, spliterator
  • Constructor Details

    • TableTree

      public TableTree(String id, List<? extends IColumn<T,S>> columns, ITreeProvider<T> dataProvider, long rowsPerPage)
      Constructor
      Parameters:
      id - component id
      columns - list of IColumn objects
      dataProvider - imodel for data provider
      rowsPerPage - number of rows per page
    • TableTree

      public TableTree(String id, List<? extends IColumn<T,S>> columns, ITreeProvider<T> provider, long rowsPerPage, org.apache.wicket.model.IModel<? extends Set<T>> state)
      Constructor
      Parameters:
      id - component id
      columns - list of IColumn objects
      provider - provider of the tree
      rowsPerPage - number of rows per page
      state - the expansion state
  • Method Details

    • newDataTable

      protected DataTable<T,S> newDataTable(String id, List<? extends IColumn<T,S>> columns, org.apache.wicket.markup.repeater.data.IDataProvider<T> dataProvider, long rowsPerPage)
      Factory method for the wrapped DataTable. Note: If overwritten, the DataTable's row items have to output their markupId, or updateNode(Object, IPartialPageRequestHandler) will fail.
      Parameters:
      id -
      columns -
      dataProvider -
      rowsPerPage -
      Returns:
      nested data table
    • getTable

      public DataTable<T,S> getTable()
      Get the nested table.
      Returns:
      the nested table
    • setItemReuseStrategy

      public final TableTree<T,S> setItemReuseStrategy(org.apache.wicket.markup.repeater.IItemReuseStrategy strategy)
      Sets the item reuse strategy. This strategy controls the creation of Items.
      Overrides:
      setItemReuseStrategy in class AbstractTree<T>
      Parameters:
      strategy - item reuse strategy
      Returns:
      this for chaining
      See Also:
      • RefreshingView.setItemReuseStrategy(IItemReuseStrategy)
      • IItemReuseStrategy
    • updateBranch

      public void updateBranch(T node, org.apache.wicket.core.request.handler.IPartialPageRequestHandler target)
      For updating of a single branch the whole table is added to the ART.
      Specified by:
      updateBranch in class AbstractTree<T>
      Parameters:
      node - node to update
      target - request target must not be @code null}
    • updateNode

      public void updateNode(T t, org.apache.wicket.core.request.handler.IPartialPageRequestHandler target)
      For an update of a node the complete row item is added to the ART.
      Specified by:
      updateNode in class AbstractTree<T>
      Parameters:
      t - node to update
      target - request target must not be @code null}
    • newDataProvider

      Hook method to create an ITreeDataProvider.
      Parameters:
      provider - the tree provider
      Returns:
      the data provider
    • newRowItem

      protected org.apache.wicket.markup.repeater.Item<T> newRowItem(String id, int index, org.apache.wicket.model.IModel<T> model)
      Create a row item for the nested DataTable.
      Parameters:
      id - component id
      index - index of row
      model - model for row
      Returns:
      row item