Class TabbedPanel
java.lang.Object
org.apache.wicket.Component
org.apache.wicket.MarkupContainer
org.apache.wicket.markup.html.WebMarkupContainer
org.apache.wicket.markup.html.panel.Panel
com.googlecode.wicket.jquery.core.JQueryPanel
com.googlecode.wicket.jquery.core.JQueryGenericPanel<List<org.apache.wicket.extensions.markup.html.tabs.ITab>>
com.googlecode.wicket.jquery.ui.widget.tabs.TabbedPanel
- All Implemented Interfaces:
com.googlecode.wicket.jquery.core.IJQueryWidget,ITabsListener,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<List<org.apache.wicket.extensions.markup.html.tabs.ITab>,,com.googlecode.wicket.jquery.core.JQueryGenericPanel<List<org.apache.wicket.extensions.markup.html.tabs.ITab>>> 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 TabbedPanel
extends com.googlecode.wicket.jquery.core.JQueryGenericPanel<List<org.apache.wicket.extensions.markup.html.tabs.ITab>>
implements ITabsListener
Provides jQuery tabs based on a
JQueryGenericPanel- Author:
- Sebastien Briquet - sebfz1
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.googlecode.wicket.jquery.core.IJQueryWidget
com.googlecode.wicket.jquery.core.IJQueryWidget.JQueryWidget -
Field Summary
Fields inherited from class com.googlecode.wicket.jquery.core.JQueryPanel
optionsFields inherited from class org.apache.wicket.markup.html.panel.Panel
PANELFields 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
ConstructorsConstructorDescriptionTabbedPanel(String id, List<org.apache.wicket.extensions.markup.html.tabs.ITab> tabs) ConstructorTabbedPanel(String id, List<org.apache.wicket.extensions.markup.html.tabs.ITab> tabs, com.googlecode.wicket.jquery.core.Options options) ConstructorTabbedPanel(String id, org.apache.wicket.model.IModel<List<org.apache.wicket.extensions.markup.html.tabs.ITab>> model) ConstructorTabbedPanel(String id, org.apache.wicket.model.IModel<List<org.apache.wicket.extensions.markup.html.tabs.ITab>> model, com.googlecode.wicket.jquery.core.Options options) Constructor -
Method Summary
Modifier and TypeMethodDescriptionbooleanadd(org.apache.wicket.extensions.markup.html.tabs.ITab tab) Helper method.voiddisable(int index, org.apache.wicket.core.request.handler.IPartialPageRequestHandler handler) Disables a tab, identified by its index.voiddisable(org.apache.wicket.core.request.handler.IPartialPageRequestHandler handler) Disables all tabsvoidenable(int index, org.apache.wicket.core.request.handler.IPartialPageRequestHandler handler) Enables a tab, identified by its indexvoidenable(org.apache.wicket.core.request.handler.IPartialPageRequestHandler handler) Enables all tabsintGets the last visible tab indexList<org.apache.wicket.extensions.markup.html.tabs.ITab>booleanIndicates whether the 'activate' event is enabled.
If true, theITabsListener.onActivate(AjaxRequestTarget, int, ITab)event will be triggered on 'activate'booleanIndicates whether the 'beforeActivate' event is enabled.
If true, theITabsListener.onActivating(AjaxRequestTarget, int, ITab)event will be triggered.booleanIndicates whether the 'create' event is enabled.
If true, theITabsListener.onActivate(AjaxRequestTarget, int, ITab)event will be triggered on 'create'protected org.apache.wicket.markup.html.WebMarkupContainernewTabContainer(String id, String tabId, org.apache.wicket.extensions.markup.html.tabs.ITab tab, int index) Gets a new tab container that contains the tab's title
Warning: override with care!protected org.apache.wicket.ComponentnewTitleLabel(String id, org.apache.wicket.model.IModel<String> title) Gets a newLabelfor the tab's titlenewWidgetBehavior(String selector) voidonActivate(org.apache.wicket.ajax.AjaxRequestTarget target, int index, org.apache.wicket.extensions.markup.html.tabs.ITab tab) Triggered when a tab has been activated ('create' and 'activate' event).voidonActivating(org.apache.wicket.ajax.AjaxRequestTarget target, int index, org.apache.wicket.extensions.markup.html.tabs.ITab tab) Triggered when a tab is being activated ('beforeActivate' event).protected voidvoidreload(org.apache.wicket.core.request.handler.IPartialPageRequestHandler handler) Reloads theTabbedPanel
Note: This method should be used instead oftarget.add(tabbedPanel)if the underlying model is-aTabListModelsetActiveTab(int index) Activates the selected tabvoidsetActiveTab(int index, org.apache.wicket.core.request.handler.IPartialPageRequestHandler handler) Activates the selected tab
Warning: invoking this method results to a dual client-server round-trip.Methods inherited from class com.googlecode.wicket.jquery.core.JQueryPanel
onBeforeRender, onConfigureMethods inherited from class org.apache.wicket.markup.html.panel.Panel
getRegionMarkup, newMarkupSourcingStrategyMethods inherited from class org.apache.wicket.markup.html.WebMarkupContainer
getWebApplication, getWebPage, getWebRequest, getWebResponse, getWebSessionMethods 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, onDetach, onRender, queue, remove, remove, removeAll, renderAll, renderAssociatedMarkup, renderNext, replace, setDefaultModel, size, stream, streamChildren, toString, toString, visitChildren, visitChildrenMethods 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, initModel, 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, wrapMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.wicket.IGenericComponent
getDefaultModel, getDefaultModelObject, getModel, setDefaultModel, setDefaultModelObject, setModel, setModelObjectMethods inherited from interface org.apache.wicket.IQueueRegion
dequeue, newDequeueContextMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
TabbedPanel
Constructor- Parameters:
id- the markup idtabs- the list ofITabs
-
TabbedPanel
public TabbedPanel(String id, List<org.apache.wicket.extensions.markup.html.tabs.ITab> tabs, com.googlecode.wicket.jquery.core.Options options) Constructor- Parameters:
id- the markup idtabs- the list ofITabsoptions- theOptions
-
TabbedPanel
public TabbedPanel(String id, org.apache.wicket.model.IModel<List<org.apache.wicket.extensions.markup.html.tabs.ITab>> model) Constructor- Parameters:
id- the markup idmodel- the list model ofITabs
-
TabbedPanel
public TabbedPanel(String id, org.apache.wicket.model.IModel<List<org.apache.wicket.extensions.markup.html.tabs.ITab>> model, com.googlecode.wicket.jquery.core.Options options) Constructor- Parameters:
id- the markup idmodel- the list model ofITabsoptions- theOptions
-
-
Method Details
-
getSelector
- Specified by:
getSelectorin classcom.googlecode.wicket.jquery.core.JQueryGenericPanel<List<org.apache.wicket.extensions.markup.html.tabs.ITab>>
-
getModelObject
-
setActiveTab
Activates the selected tab- Parameters:
index- the tab's index to activate- Returns:
- this, for chaining
-
setActiveTab
public void setActiveTab(int index, org.apache.wicket.core.request.handler.IPartialPageRequestHandler handler) Activates the selected tab
Warning: invoking this method results to a dual client-server round-trip. Use this method if you cannot usesetActiveTab(int)followed bytarget.add(myTabbedPannel)- Parameters:
index- the tab's index to activatehandler- theIPartialPageRequestHandler
-
enable
public void enable(org.apache.wicket.core.request.handler.IPartialPageRequestHandler handler) Enables all tabs- Parameters:
handler- theIPartialPageRequestHandler
-
enable
public void enable(int index, org.apache.wicket.core.request.handler.IPartialPageRequestHandler handler) Enables a tab, identified by its index- Parameters:
index- the tab's index to enablehandler- theIPartialPageRequestHandler
-
disable
public void disable(org.apache.wicket.core.request.handler.IPartialPageRequestHandler handler) Disables all tabs- Parameters:
handler- theIPartialPageRequestHandler
-
disable
public void disable(int index, org.apache.wicket.core.request.handler.IPartialPageRequestHandler handler) Disables a tab, identified by its index. The selected tab cannot be disabled.- Parameters:
index- the tab's index to disablehandler- theIPartialPageRequestHandler
-
getLastTabIndex
public int getLastTabIndex()Gets the last visible tab index- Returns:
- the tab index, or -1 if none
-
isCreateEventEnabled
public boolean isCreateEventEnabled()Description copied from interface:ITabsListenerIndicates whether the 'create' event is enabled.
If true, theITabsListener.onActivate(AjaxRequestTarget, int, ITab)event will be triggered on 'create'- Specified by:
isCreateEventEnabledin interfaceITabsListener- Returns:
- true by default
-
isActivateEventEnabled
public boolean isActivateEventEnabled()Description copied from interface:ITabsListenerIndicates whether the 'activate' event is enabled.
If true, theITabsListener.onActivate(AjaxRequestTarget, int, ITab)event will be triggered on 'activate'- Specified by:
isActivateEventEnabledin interfaceITabsListener- Returns:
- true by default
-
isActivatingEventEnabled
public boolean isActivatingEventEnabled()Description copied from interface:ITabsListenerIndicates whether the 'beforeActivate' event is enabled.
If true, theITabsListener.onActivating(AjaxRequestTarget, int, ITab)event will be triggered.- Specified by:
isActivatingEventEnabledin interfaceITabsListener- Returns:
- false by default
-
add
public boolean add(org.apache.wicket.extensions.markup.html.tabs.ITab tab) Helper method. Adds anITabto the list of tabs.- Parameters:
tab- theITabto be added- Returns:
- true (as specified by Collection.add)
-
reload
public void reload(org.apache.wicket.core.request.handler.IPartialPageRequestHandler handler) Reloads theTabbedPanel
Note: This method should be used instead oftarget.add(tabbedPanel)if the underlying model is-aTabListModel- Parameters:
handler- theIPartialPageRequestHandler
-
onInitialize
protected void onInitialize()- Overrides:
onInitializein classorg.apache.wicket.MarkupContainer
-
onActivate
public void onActivate(org.apache.wicket.ajax.AjaxRequestTarget target, int index, org.apache.wicket.extensions.markup.html.tabs.ITab tab) Description copied from interface:ITabsListenerTriggered when a tab has been activated ('create' and 'activate' event).- Specified by:
onActivatein interfaceITabsListener- Parameters:
target- theAjaxRequestTargetindex- the tab index that triggered this eventtab- theITabthat corresponds to the index
-
onActivating
public void onActivating(org.apache.wicket.ajax.AjaxRequestTarget target, int index, org.apache.wicket.extensions.markup.html.tabs.ITab tab) Description copied from interface:ITabsListenerTriggered when a tab is being activated ('beforeActivate' event).- Specified by:
onActivatingin interfaceITabsListener- Parameters:
target- theAjaxRequestTargetindex- the previously selected tab indextab- theITabthat corresponds to the index
-
newTitleLabel
protected org.apache.wicket.Component newTitleLabel(String id, org.apache.wicket.model.IModel<String> title) Gets a newLabelfor the tab's title- Parameters:
id- the markup idtitle- the tab's title model- Returns:
- a new
Label
-
newTabContainer
protected org.apache.wicket.markup.html.WebMarkupContainer newTabContainer(String id, String tabId, org.apache.wicket.extensions.markup.html.tabs.ITab tab, int index) Gets a new tab container that contains the tab's title
Warning: override with care!- Parameters:
id- the container's markup-idtabId- the tab html-idtab- theITabindex- the tab index- Returns:
- a new
WebMarkupContainer
-
newWidgetBehavior
- Specified by:
newWidgetBehaviorin interfacecom.googlecode.wicket.jquery.core.IJQueryWidget
-