Class AjaxTabbedPanel<T extends org.apache.wicket.extensions.markup.html.tabs.ITab>

  • Type Parameters:
    T - The type of panel to be used for this component's tabs. Just use ITab if you have no special needs here.
    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.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:
    TabCenterTabbedPanel

    public class AjaxTabbedPanel<T extends org.apache.wicket.extensions.markup.html.tabs.ITab>
    extends TabbedPanel<T>
    Ajaxified version of the tabbed panel. Uses AjaxFallbackLink instead of regular wicket links so it can update itself inplace.
    Author:
    Igor Vaynberg (ivaynberg), shood
    See Also:
    Serialized Form
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected org.apache.wicket.markup.html.WebMarkupContainer newLink​(String linkId, int index)
      Factory method for links used to switch between tabs.
      protected void onAjaxUpdate​(Optional<org.apache.wicket.ajax.AjaxRequestTarget> target)
      A template method that lets users add additional behavior when ajax update occurs.
      protected void onClickTabPerformed​(int index, Optional<org.apache.wicket.ajax.AjaxRequestTarget> target)  
      • 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, 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, 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 interface org.apache.wicket.IQueueRegion

        dequeue, newDequeueContext
    • Constructor Detail

      • AjaxTabbedPanel

        public AjaxTabbedPanel​(String id,
                               List<T> tabs)
        Constructor
        Parameters:
        id -
        tabs -
      • AjaxTabbedPanel

        public AjaxTabbedPanel​(String id,
                               List<T> tabs,
                               org.apache.wicket.model.IModel<Integer> model)
        Constructor
        Parameters:
        id -
        tabs -
        model - model holding the index of the selected tab
    • Method Detail

      • newLink

        protected org.apache.wicket.markup.html.WebMarkupContainer newLink​(String linkId,
                                                                           int index)
        Description copied from class: TabbedPanel
        Factory method for links used to switch between tabs.

        The created component is attached to the following markup. Label component with id: title will be added for you by the tabbed panel.

         <a href="#" wicket:id="link"><span wicket:id="title">[[tab title]]</span></a>
         

        Example implementation:

         protected WebMarkupContainer newLink(String linkId, final int index)
         {
             return new Link(linkId)
            {
                 private static final long serialVersionUID = 1L;
        
                 public void onClick()
                {
                     setSelectedTab(index);
                }
            };
         }
         
        Overrides:
        newLink in class TabbedPanel<T extends org.apache.wicket.extensions.markup.html.tabs.ITab>
        Parameters:
        linkId - component id with which the link should be created
        index - index of the tab that should be activated when this link is clicked. See TabbedPanel.setSelectedTab(int).
        Returns:
        created link component
      • onClickTabPerformed

        protected void onClickTabPerformed​(int index,
                                           Optional<org.apache.wicket.ajax.AjaxRequestTarget> target)
      • onAjaxUpdate

        protected void onAjaxUpdate​(Optional<org.apache.wicket.ajax.AjaxRequestTarget> target)
        A template method that lets users add additional behavior when ajax update occurs. This method is called after the current tab has been set so access to it can be obtained via TabbedPanel.getSelectedTab().

        Note Since an AjaxFallbackLink is used to back the ajax update the target argument can be null when the client browser does not support ajax and the fallback mode is used. See AjaxFallbackLink for details.

        Parameters:
        target - ajax target used to update this component