|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectwicket.Component
wicket.MarkupContainer
wicket.markup.html.WebMarkupContainer
wicket.markup.html.WebMarkupContainerWithAssociatedMarkup
wicket.markup.html.panel.Panel
wicket.extensions.markup.html.tabs.TabbedPanel
TabbedPanel component represets a panel with tabs that are used to switch between different content panels inside the TabbedPanel panel.
Example:
List tabs=new ArrayList();
tabs.add(new AbstractTab(new Model("first tab")) {
public Panel getPanel(String panelId)
{
return new TabPanel1(panelId);
}
});
tabs.add(new AbstractTab(new Model("second tab")) {
public Panel getPanel(String panelId)
{
return new TabPanel2(panelId);
}
});
add(new TabbedPanel("tabs", tabs);
<span wicket:id="tabs" class="tabpanel">[tabbed panel will be here]</span>
For a complete example see the component references in wicket-examples project
ITab,
Serialized Form| Nested Class Summary |
| Nested classes inherited from class wicket.markup.html.WebMarkupContainerWithAssociatedMarkup |
wicket.markup.html.WebMarkupContainerWithAssociatedMarkup.HeaderPartContainer |
| Nested classes inherited from class wicket.Component |
wicket.Component.ComponentModelChange, wicket.Component.EnabledChange, wicket.Component.IVisitor, wicket.Component.VisibilityChange |
| Field Summary | |
static java.lang.String |
TAB_PANEL_ID
id used for child panels |
| Fields inherited from class wicket.Component |
ENABLE, FLAG_RESERVED1, FLAG_RESERVED2, FLAG_RESERVED3, FLAG_RESERVED4, FLAG_RESERVED5, FLAG_RESERVED6, FLAG_RESERVED7, FLAG_RESERVED8, PATH_SEPARATOR, RENDER |
| Constructor Summary | |
TabbedPanel(java.lang.String id,
java.util.List tabs)
Constructor |
|
| Method Summary | |
int |
getSelectedTab()
|
java.util.List |
getTabs()
|
protected wicket.markup.html.WebMarkupContainer |
newLink(java.lang.String linkId,
int index)
Factory method for links used to switch between tabs. |
void |
setSelectedTab(int index)
sets the selected tab |
| Methods inherited from class wicket.markup.html.panel.Panel |
onComponentTag, onComponentTagBody, renderHead |
| Methods inherited from class wicket.markup.html.WebMarkupContainerWithAssociatedMarkup |
newHeaderPartContainer, renderHeadFromAssociatedMarkupFile |
| Methods inherited from class wicket.markup.html.WebMarkupContainer |
getMarkupType, getWebPage |
| Methods inherited from class wicket.MarkupContainer |
add, autoAdd, contains, findMarkupStream, get, getAssociatedMarkupStream, getMarkupStream, internalAdd, internalAttach, internalDetach, isTransparentResolver, iterator, iterator, newMarkupResourceStream, onRender, remove, remove, removeAll, renderAll, renderAssociatedMarkup, renderComponentTagBody, replace, setMarkupStream, setModel, size, toString, toString, visitChildren, visitChildren |
| Methods inherited from class wicket.Component |
add, addStateChange, checkComponentTag, checkComponentTagAttribute, continueToOriginalDestination, debug, detachBehaviors, detachModel, detachModels, error, exceptionMessage, fatal, findPage, findParent, findParentWithAssociatedMarkup, getApplication, getApplicationPages, getApplicationSettings, getBehaviors, getBehaviors, getClassRelativePath, getConverter, getEscapeModelStrings, getFeedbackMessage, getFlag, getFlag, getId, getLocale, getLocalizer, getMarkupAttributes, getMarkupId, getMetaData, getModel, getModelComparator, getModelObject, getModelObjectAsString, getOutputMarkupId, getPage, getPageFactory, getPageRelativePath, getParent, getPath, getRenderBodyOnly, getRequest, getRequestCycle, getResponse, getSession, getSizeInBytes, getString, getString, getString, getStyle, getVariation, hasErrorMessage, hasFeedbackMessage, info, initModel, internalOnAttach, internalOnDetach, internalOnModelChanged, isActionAuthorized, isAncestorOf, isBehaviorAccepted, isEnableAllowed, isEnabled, isHeadRendered, isIgnoreAttributeModifier, isRenderAllowed, isVersioned, isVisible, isVisibleInHierarchy, modelChanged, modelChanging, newPage, newPage, onAfterRender, onAttach, onBeforeRender, onBeginRequest, onDetach, onEndRequest, onModelChanged, onModelChanging, onRender, redirectToInterceptPage, remove, render, render, renderComponent, renderComponent, renderComponentTag, rendered, renderedBehaviors, replaceComponentTagBody, replaceWith, resetHeadRendered, sameRootModel, sameRootModel, setAuto, setEnabled, setEscapeModelStrings, setFlag, setFlag, setIgnoreAttributeModifier, setMetaData, setModelObject, setOutputMarkupId, setRedirect, setRenderBodyOnly, setResponsePage, setResponsePage, setResponsePage, setVersioned, setVisible, urlFor, urlFor, urlFor, urlFor, urlFor, visitParents, warn |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final java.lang.String TAB_PANEL_ID
| Constructor Detail |
public TabbedPanel(java.lang.String id,
java.util.List tabs)
id - component idtabs - list of ITab objects used to represent tabs| Method Detail |
public final java.util.List getTabs()
protected wicket.markup.html.WebMarkupContainer newLink(java.lang.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).
public final void setSelectedTab(int index)
index - index of the tab to selectpublic final int getSelectedTab()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||