public class TabbedPanel extends com.googlecode.wicket.jquery.core.JQueryGenericPanel<List<org.apache.wicket.extensions.markup.html.tabs.ITab>> implements ITabsListener
JQueryGenericPanel
Constructor and Description |
---|
TabbedPanel(String id,
org.apache.wicket.model.IModel<List<org.apache.wicket.extensions.markup.html.tabs.ITab>> model)
Constructor
|
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
|
TabbedPanel(String id,
List<org.apache.wicket.extensions.markup.html.tabs.ITab> tabs)
Constructor
|
TabbedPanel(String id,
List<org.apache.wicket.extensions.markup.html.tabs.ITab> tabs,
com.googlecode.wicket.jquery.core.Options options)
Constructor
|
Modifier and Type | Method and Description |
---|---|
boolean |
add(org.apache.wicket.extensions.markup.html.tabs.ITab tab)
Helper method.
|
void |
disable(int index,
org.apache.wicket.core.request.handler.IPartialPageRequestHandler handler)
Disables a tab, identified by its index.
|
void |
disable(org.apache.wicket.core.request.handler.IPartialPageRequestHandler handler)
Disables all tabs
|
void |
enable(int index,
org.apache.wicket.core.request.handler.IPartialPageRequestHandler handler)
Enables a tab, identified by its index
|
void |
enable(org.apache.wicket.core.request.handler.IPartialPageRequestHandler handler)
Enables all tabs
|
int |
getLastTabIndex()
Gets the last visible tab index
|
List<org.apache.wicket.extensions.markup.html.tabs.ITab> |
getModelObject() |
boolean |
isActivateEventEnabled()
Indicates whether the 'activate' event is enabled.
If true, the ITabsListener.onActivate(AjaxRequestTarget, int, ITab) event will be triggered on 'activate' |
boolean |
isActivatingEventEnabled()
Indicates whether the 'beforeActivate' event is enabled.
If true, the ITabsListener.onActivating(AjaxRequestTarget, int, ITab) event will be triggered. |
boolean |
isCreateEventEnabled()
Indicates whether the 'create' event is enabled.
If true, the ITabsListener.onActivate(AjaxRequestTarget, int, ITab) event will be triggered on 'create' |
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! |
protected org.apache.wicket.Component |
newTitleLabel(String id,
org.apache.wicket.model.IModel<String> title)
Gets a new
Label for the tab's title |
TabsBehavior |
newWidgetBehavior(String selector) |
void |
onActivate(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).
|
void |
onActivating(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 void |
onInitialize() |
void |
reload(org.apache.wicket.core.request.handler.IPartialPageRequestHandler handler)
Reloads the
TabbedPanel Note: This method should be used instead of target.add(tabbedPanel) if the underlying model is-a TabListModel |
TabbedPanel |
setActiveTab(int index)
Activates the selected tab
|
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. |
onBeforeRender, onConfigure
getRegionMarkup, newMarkupSourcingStrategy
getWebApplication, getWebPage, getWebRequest, getWebResponse, getWebSession
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, visitChildren
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, 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, wrap
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getDefaultModel, getDefaultModelObject, getModel, setDefaultModel, setDefaultModelObject, setModel, setModelObject
forEach, spliterator
public TabbedPanel(String id, List<org.apache.wicket.extensions.markup.html.tabs.ITab> tabs)
id
- the markup idtabs
- the list of ITab
s
public TabbedPanel(String id, List<org.apache.wicket.extensions.markup.html.tabs.ITab> tabs, com.googlecode.wicket.jquery.core.Options options)
id
- the markup idtabs
- the list of ITab
s
options
- the Options
public TabbedPanel(String id, org.apache.wicket.model.IModel<List<org.apache.wicket.extensions.markup.html.tabs.ITab>> model)
id
- the markup idmodel
- the list model of ITab
s
public List<org.apache.wicket.extensions.markup.html.tabs.ITab> getModelObject()
public TabbedPanel setActiveTab(int index)
index
- the tab's index to activatepublic void setActiveTab(int index, org.apache.wicket.core.request.handler.IPartialPageRequestHandler handler)
setActiveTab(int)
followed by target.add(myTabbedPannel)
index
- the tab's index to activatehandler
- the IPartialPageRequestHandler
public void enable(org.apache.wicket.core.request.handler.IPartialPageRequestHandler handler)
handler
- the IPartialPageRequestHandler
public void enable(int index, org.apache.wicket.core.request.handler.IPartialPageRequestHandler handler)
index
- the tab's index to enablehandler
- the IPartialPageRequestHandler
public void disable(org.apache.wicket.core.request.handler.IPartialPageRequestHandler handler)
handler
- the IPartialPageRequestHandler
public void disable(int index, org.apache.wicket.core.request.handler.IPartialPageRequestHandler handler)
index
- the tab's index to disablehandler
- the IPartialPageRequestHandler
public int getLastTabIndex()
public boolean isCreateEventEnabled()
ITabsListener
ITabsListener.onActivate(AjaxRequestTarget, int, ITab)
event will be triggered on 'create'isCreateEventEnabled
in interface ITabsListener
public boolean isActivateEventEnabled()
ITabsListener
ITabsListener.onActivate(AjaxRequestTarget, int, ITab)
event will be triggered on 'activate'isActivateEventEnabled
in interface ITabsListener
public boolean isActivatingEventEnabled()
ITabsListener
ITabsListener.onActivating(AjaxRequestTarget, int, ITab)
event will be triggered.isActivatingEventEnabled
in interface ITabsListener
public boolean add(org.apache.wicket.extensions.markup.html.tabs.ITab tab)
ITab
to the list of tabs.tab
- the ITab
to be addedpublic void reload(org.apache.wicket.core.request.handler.IPartialPageRequestHandler handler)
TabbedPanel
target.add(tabbedPanel)
if the underlying model is-a TabListModel
handler
- the IPartialPageRequestHandler
protected void onInitialize()
onInitialize
in class org.apache.wicket.MarkupContainer
public void onActivate(org.apache.wicket.ajax.AjaxRequestTarget target, int index, org.apache.wicket.extensions.markup.html.tabs.ITab tab)
ITabsListener
onActivate
in interface ITabsListener
target
- the AjaxRequestTarget
index
- the tab index that triggered this eventtab
- the ITab
that corresponds to the indexpublic void onActivating(org.apache.wicket.ajax.AjaxRequestTarget target, int index, org.apache.wicket.extensions.markup.html.tabs.ITab tab)
ITabsListener
onActivating
in interface ITabsListener
target
- the AjaxRequestTarget
index
- the previously selected tab indextab
- the ITab
that corresponds to the indexprotected org.apache.wicket.Component newTitleLabel(String id, org.apache.wicket.model.IModel<String> title)
Label
for the tab's titleid
- the markup idtitle
- the tab's title modelLabel
protected org.apache.wicket.markup.html.WebMarkupContainer newTabContainer(String id, String tabId, org.apache.wicket.extensions.markup.html.tabs.ITab tab, int index)
id
- the container's markup-idtabId
- the tab html-idtab
- the ITab
index
- the tab indexWebMarkupContainer
public TabsBehavior newWidgetBehavior(String selector)
newWidgetBehavior
in interface com.googlecode.wicket.jquery.core.IJQueryWidget
Copyright © 2018 7thWeb. All rights reserved.