T - the generic typepublic abstract class AjaxAddableTabbedPanel<T extends ICloseableTab>
extends org.apache.wicket.markup.html.panel.Panel
| Modifier and Type | Field and Description |
|---|---|
static String |
TAB_PANEL_ID
id used for child panels
|
ENABLE, FLAG_AFTER_RENDERING, FLAG_INITIALIZED, FLAG_PREPARED_FOR_RENDER, FLAG_REMOVING_FROM_HIERARCHY, FLAG_RENDERING, FLAG_RESERVED1, FLAG_RESERVED2, FLAG_RESERVED3, FLAG_RESERVED4, FLAG_RESERVED5, FLAG_RESERVED8, PARENT_PATH, PATH_SEPARATOR, RENDER, RFLAG_CONTAINER_DEQUEING| Constructor and Description |
|---|
AjaxAddableTabbedPanel(String id,
List<T> tabs)
Instantiates a new
AjaxAddableTabbedPanel. |
AjaxAddableTabbedPanel(String id,
List<T> tabs,
org.apache.wicket.model.IModel<Integer> model)
Instantiates a new
AjaxAddableTabbedPanel. |
| Modifier and Type | Method and Description |
|---|---|
protected String |
getLastTabCssClass()
Get the css class of the last tab.
|
int |
getSelectedTab()
Get the selected tab.
|
protected String |
getSelectedTabCssClass()
Get the css class of the selected tab.
|
protected String |
getTabContainerCssClass()
Get the css class of the tab container.
|
List<T> |
getTabs()
Gets the list of tabs that can be used by the user to add/remove/reorder tabs in the panel.
|
protected org.apache.wicket.model.IModel<?> |
initModel()
Override of the default initModel behaviour.
|
protected abstract org.apache.wicket.Component |
newAddTab(String id,
org.apache.wicket.model.IModel<String> model)
Abstract factory method for creating the new tab
Component. |
protected org.apache.wicket.markup.html.basic.Label |
newAddTabButtonLabel(String id,
org.apache.wicket.model.IModel<String> model)
Factory method for creating the new label of the button.
|
protected abstract org.apache.wicket.markup.html.basic.Label |
newaddTabLabel(String id,
org.apache.wicket.model.IModel<String> model)
Abstract factory method for creating the new
Label for the tab Component. |
protected abstract org.apache.wicket.model.IModel<String> |
newAddTabLabelModel()
Abstract factory method for creating the new
IModel for the add tab Label. |
protected abstract org.apache.wicket.Component |
newAddTabModalWindow(String id,
org.apache.wicket.model.IModel<String> model)
Abstract factory method for creating a new
Component for the modal dialog for create
a new Component for the tab. |
protected org.apache.wicket.markup.html.WebMarkupContainer |
newCloseLink(String linkId,
int index)
Factory method for links used to close the selected tab.
|
protected org.apache.wicket.Component |
newCloseTitle(String titleId,
org.apache.wicket.model.IModel<?> titleModel,
int index)
Factory method for tab titles.
|
protected org.apache.wicket.markup.html.WebMarkupContainer |
newLink(String linkId,
int index)
Factory method for links used to switch between tabs.
|
protected org.apache.wicket.markup.html.list.LoopItem |
newTabContainer(int tabIndex)
Generates a loop item used to represent a specific tab's
li element. |
protected org.apache.wicket.markup.html.WebMarkupContainer |
newTabsContainer(String id)
Generates the container for all tabs.
|
protected org.apache.wicket.markup.html.list.Loop |
newTabsLoop(String id,
org.apache.wicket.model.IModel<Integer> model)
Factory method for creating a new
Loop for the tabs. |
protected org.apache.wicket.Component |
newTitle(String titleId,
org.apache.wicket.model.IModel<?> titleModel,
int index)
Factory method for tab titles.
|
protected void |
onAjaxUpdate(org.apache.wicket.ajax.AjaxRequestTarget target)
A template method that lets users add additional behavior when ajax update occurs.
|
protected void |
onBeforeRender() |
protected void |
onDetach() |
void |
onNewTab(org.apache.wicket.ajax.AjaxRequestTarget target,
T tab)
On new tab.
|
void |
onNewTab(org.apache.wicket.ajax.AjaxRequestTarget target,
T tab,
int index)
On new tab.
|
void |
onRemoveTab(org.apache.wicket.ajax.AjaxRequestTarget target,
int index)
On remove tab removes the tab of the given index.
|
void |
onRemoveTab(org.apache.wicket.ajax.AjaxRequestTarget target,
T tab)
On remove tab removes the given tab if it does exists.
|
AjaxAddableTabbedPanel<T> |
setSelectedTab(int index)
sets the selected tab
|
getRegionMarkup, newMarkupSourcingStrategygetWebApplication, getWebPage, getWebRequest, getWebResponse, getWebSessionadd, addDequeuedComponent, addOrReplace, autoAdd, canDequeueTag, contains, dequeue, dequeue, dequeuePreamble, findComponentToDequeue, get, get, getAssociatedMarkup, getAssociatedMarkupStream, getMarkup, getMarkupType, internalAdd, internalInitialize, iterator, iterator, newDequeueContext, onAfterRenderChildren, onComponentTagBody, onInitialize, onRender, queue, remove, remove, removeAll, renderAll, renderAssociatedMarkup, renderNext, replace, setDefaultModel, size, swap, toString, toString, visitChildren, visitChildren, visitChildren, visitChildrenadd, addStateChange, afterRender, beforeRender, canCallListenerInterface, canCallListenerInterfaceAfterExpiry, checkComponentTag, checkComponentTagAttribute, checkHierarchyChange, clearOriginalDestination, configure, continueToOriginalDestination, 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, internalOnModelChanged, internalPrepareForRender, internalRenderComponent, internalRenderHead, isActionAuthorized, isAuto, isBehaviorAccepted, isEnableAllowed, isEnabled, isEnabledInHierarchy, isIgnoreAttributeModifier, isRenderAllowed, isRendering, isStateless, isVersioned, isVisibilityAllowed, isVisible, isVisibleInHierarchy, markRendering, modelChanged, modelChanging, onAfterRender, onComponentTag, onConfigure, onEvent, onModelChanged, onModelChanging, onReAdd, onRemove, prepareForRender, redirectToInterceptPage, remove, remove, render, renderComponentTag, rendered, renderHead, renderHead, renderPlaceholderTag, replaceComponentTagBody, replaceWith, sameInnermostModel, sameInnermostModel, send, setAuto, setDefaultModelObject, setEnabled, setEscapeModelStrings, setFlag, setIgnoreAttributeModifier, setMarkup, setMarkupId, setMarkupIdImpl, setMetaData, setOutputMarkupId, setOutputMarkupPlaceholderTag, setParent, setRenderBodyOnly, setRequestFlag, setResponsePage, setResponsePage, setResponsePage, setVersioned, setVisibilityAllowed, setVisible, success, urlFor, urlFor, urlFor, urlFor, urlFor, visitParents, visitParents, warn, wrapclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitforEach, spliteratorpublic static final String TAB_PANEL_ID
public AjaxAddableTabbedPanel(String id, List<T> tabs)
AjaxAddableTabbedPanel.id - component idtabs - list of ITab objects used to represent tabspublic AjaxAddableTabbedPanel(String id, List<T> tabs, org.apache.wicket.model.IModel<Integer> model)
AjaxAddableTabbedPanel.id - component idtabs - list of ITab objects used to represent tabsmodel - model holding the index of the selected tabprotected String getLastTabCssClass()
lastpublic final int getSelectedTab()
protected String getSelectedTabCssClass()
selectedprotected String getTabContainerCssClass()
tab-rowpublic final List<T> getTabs()
protected org.apache.wicket.model.IModel<?> initModel()
initModel in class org.apache.wicket.ComponentComponent.initModel()protected abstract org.apache.wicket.Component newAddTab(String id, org.apache.wicket.model.IModel<String> model)
Component. This method is invoked in
the constructor from the derived classes and have to be implemented so users can provide
their own version of a new tab Component.id - the idmodel - the modelprotected org.apache.wicket.markup.html.basic.Label newAddTabButtonLabel(String id, org.apache.wicket.model.IModel<String> model)
id - the idmodel - the modelprotected abstract org.apache.wicket.markup.html.basic.Label newaddTabLabel(String id, org.apache.wicket.model.IModel<String> model)
Label for the tab Component.
This method is invoked in the constructor from the derived classes and have to be implemented
so users can provide their own version of a new Label for the tab Component.id - the idmodel - the modelLabel for the tab Component.protected abstract org.apache.wicket.model.IModel<String> newAddTabLabelModel()
IModel for the add tab Label.
This method is invoked in the constructor from the derived classes and have to be implemented
so users can provide their own version of a new new IModel for the add tab
Label.IModel for the add tab Label.protected abstract org.apache.wicket.Component newAddTabModalWindow(String id, org.apache.wicket.model.IModel<String> model)
Component for the modal dialog for create
a new Component for the tab. This method is invoked in the constructor from the
derived classes and have to be implemented so users can provide their own version of a new
Component for the modal dialog for create a new Component for the tab.id - the idmodel - the modelComponent for the modal dialog for create a new Component for
the tab.protected org.apache.wicket.markup.html.WebMarkupContainer newCloseLink(String linkId, int index)
<a href="#" wicket:id="link"><span wicket:id="title">[[tab title]]</span></a>Example implementation:
protected WebMarkupContainer newCloseLink(String linkId, final int index)
{
return new Link(linkId)
{
private static final long serialVersionUID = 1L;
public void onClick()
{
setSelectedTab(index);
}
};
}
linkId - component id with which the link should be createdindex - index of the tab that should be activated when this link is clicked. See
setSelectedTab(int).protected org.apache.wicket.Component newCloseTitle(String titleId, org.apache.wicket.model.IModel<?> titleModel, int index)
titleId - id of title componenttitleModel - model containing tab titleindex - index of tabprotected org.apache.wicket.markup.html.WebMarkupContainer newLink(String linkId, int index)
<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);
}
};
}
linkId - component id with which the link should be createdindex - index of the tab that should be activated when this link is clicked. See
setSelectedTab(int).protected org.apache.wicket.markup.html.list.LoopItem newTabContainer(int tabIndex)
li element.tabIndex - the tab indexprotected org.apache.wicket.markup.html.WebMarkupContainer newTabsContainer(String id)
class attribute based on the return value of getTabContainerCssClass()id - container idprotected org.apache.wicket.markup.html.list.Loop newTabsLoop(String id, org.apache.wicket.model.IModel<Integer> model)
Loop for the tabs.id - the idmodel - the modelLoop for the tabs.protected org.apache.wicket.Component newTitle(String titleId, org.apache.wicket.model.IModel<?> titleModel, int index)
titleId - id of title componenttitleModel - model containing tab titleindex - index of tabprotected void onAjaxUpdate(org.apache.wicket.ajax.AjaxRequestTarget target)
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.
target - ajax target used to update this componentprotected void onBeforeRender()
onBeforeRender in class org.apache.wicket.Componentprotected void onDetach()
onDetach in class org.apache.wicket.MarkupContainerpublic void onNewTab(org.apache.wicket.ajax.AjaxRequestTarget target,
T tab)
target - the targettab - the tabpublic void onNewTab(org.apache.wicket.ajax.AjaxRequestTarget target,
T tab,
int index)
target - the targettab - the tabindex - the indexpublic void onRemoveTab(org.apache.wicket.ajax.AjaxRequestTarget target,
int index)
target - the targetindex - the indexpublic void onRemoveTab(org.apache.wicket.ajax.AjaxRequestTarget target,
T tab)
target - the targettab - the tabpublic AjaxAddableTabbedPanel<T> setSelectedTab(int index)
index - index of the tab to selectIndexOutOfBoundsException - if index is not in the range of available tabsCopyright © 2010–2016 Alpha Ro Group UG (haftungsbeschrÀngt). All rights reserved.