Class AjaxTabbedPanel<T extends ITab>
- 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.tabs.TabbedPanel<T>
-
- org.apache.wicket.extensions.ajax.markup.html.tabs.AjaxTabbedPanel<T>
-
- Type Parameters:
T
- The type of panel to be used for this component's tabs. Just useITab
if you have no special needs here.
- All Implemented Interfaces:
Serializable
,Iterable<Component>
,IEventSink
,IEventSource
,IFeedbackContributor
,IConverterLocator
,IMetadataContext<Serializable,Component>
,IQueueRegion
,IHeaderContributor
,IRequestableComponent
,IHierarchical<Component>
,IClusterable
public class AjaxTabbedPanel<T extends 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)
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.apache.wicket.extensions.markup.html.tabs.TabbedPanel
CONTAINER_CSS_CLASS_KEY, LAST_CSS_CLASS_KEY, SELECTED_CSS_CLASS_KEY, TAB_PANEL_ID
-
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 AjaxTabbedPanel(String id, List<T> tabs)
ConstructorAjaxTabbedPanel(String id, List<T> tabs, IModel<Integer> model)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected WebMarkupContainer
newLink(String linkId, int index)
Factory method for links used to switch between tabs.protected void
onAjaxUpdate(Optional<AjaxRequestTarget> target)
A template method that lets users add additional behavior when ajax update occurs.-
Methods inherited from class org.apache.wicket.extensions.markup.html.tabs.TabbedPanel
getLastTabCssClass, getSelectedTab, getSelectedTabCssClass, getTabContainerCssClass, getTabs, initModel, newTabContainer, newTabsContainer, newTitle, onBeforeRender, onDetach, setSelectedTab
-
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 class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.wicket.IQueueRegion
dequeue, newDequeueContext
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Constructor Detail
-
AjaxTabbedPanel
public AjaxTabbedPanel(String id, List<T> tabs)
Constructor- Parameters:
id
-tabs
-
-
-
Method Detail
-
newLink
protected 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 classTabbedPanel<T extends ITab>
- Parameters:
linkId
- component id with which the link should be createdindex
- index of the tab that should be activated when this link is clicked. SeeTabbedPanel.setSelectedTab(int)
.- Returns:
- created link component
-
onAjaxUpdate
protected void onAjaxUpdate(Optional<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 viaTabbedPanel.getSelectedTab()
.Note Since an
AjaxFallbackLink
is used to back the ajax update thetarget
argument can be null when the client browser does not support ajax and the fallback mode is used. SeeAjaxFallbackLink
for details.- Parameters:
target
- ajax target used to update this component
-
-