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 useITabif 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
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
-
-
Constructor Summary
Constructors Constructor Description AjaxTabbedPanel(String id, List<T> tabs)ConstructorAjaxTabbedPanel(String id, List<T> tabs, org.apache.wicket.model.IModel<Integer> model)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.apache.wicket.markup.html.WebMarkupContainernewLink(String linkId, int index)Factory method for links used to switch between tabs.protected voidonAjaxUpdate(Optional<org.apache.wicket.ajax.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 java.lang.Iterable
forEach, spliterator
-
-
-
-
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:TabbedPanelFactory 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:
newLinkin 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<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 viaTabbedPanel.getSelectedTab().Note Since an
AjaxFallbackLinkis used to back the ajax update thetargetargument can be null when the client browser does not support ajax and the fallback mode is used. SeeAjaxFallbackLinkfor details.- Parameters:
target- ajax target used to update this component
-
-