Module org.apache.wicket.extensions
Class BreadCrumbBar
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.breadcrumb.BreadCrumbBar
- All Implemented Interfaces:
Serializable,Iterable<Component>,IEventSink,IEventSource,IBreadCrumbModel,IFeedbackContributor,IConverterLocator,IMetadataContext<Serializable,,Component> IQueueRegion,IHeaderContributor,IRequestableComponent,org.apache.wicket.util.IHierarchical<Component>,org.apache.wicket.util.io.IClusterable
A component that renders bread crumbs. By default, it renders a horizontal list from left to
right (oldest left) with bread crumb links and a ' / ' as a separator, e.g.
first / second / third
Delegates how the bread crumb model works to DefaultBreadCrumbsModel.
Override and provide your own markup file if you want to work with other elements, e.g. uls instead of spans.
- Author:
- Eelco Hillenius
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classList view for rendering the bread crumbs. -
Field Summary
Fields 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddListener(IBreadCrumbModelListener listener) Adds a bread crumb model listener.Lists the bread crumb participants in this model.Gets the currently active participant, if any.protected booleanGets whether the current bread crumb should be displayed as a link (e.g. for refreshing) or as a disabled link (effectively just a label).protected Stringprotected ComponentnewBreadCrumbComponent(String id, long index, int total, IBreadCrumbParticipant breadCrumbParticipant) Creates a new bread crumb component.protected voidonDetach()voidremoveListener(IBreadCrumbModelListener listener) Removes a bread crumb model listener.voidsetActive(IBreadCrumbParticipant breadCrumbParticipant) Sets thebread crumbas the active one.Methods 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, onInitialize, 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.IQueueRegion
dequeue, newDequeueContextMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
BreadCrumbBar
Construct.- Parameters:
id- Component id
-
-
Method Details
-
addListener
Description copied from interface:IBreadCrumbModelAdds a bread crumb model listener.- Specified by:
addListenerin interfaceIBreadCrumbModel- Parameters:
listener- The listener to add
-
allBreadCrumbParticipants
Description copied from interface:IBreadCrumbModelLists the bread crumb participants in this model.- Specified by:
allBreadCrumbParticipantsin interfaceIBreadCrumbModel- Returns:
- The bread crumbs participants, as list with
bread crumb participants.
-
getActive
Description copied from interface:IBreadCrumbModelGets the currently active participant, if any.- Specified by:
getActivein interfaceIBreadCrumbModel- Returns:
- The currently active participant, may be null
-
removeListener
Description copied from interface:IBreadCrumbModelRemoves a bread crumb model listener.- Specified by:
removeListenerin interfaceIBreadCrumbModel- Parameters:
listener- The listener to remove
-
setActive
Description copied from interface:IBreadCrumbModelSets thebread crumbas the active one. Implementations should callbread crumb addedwhen the bread crumb was not yet part of the model, andbread crumb removedfor every crumb that was removed as the result of this call.- Specified by:
setActivein interfaceIBreadCrumbModel- Parameters:
breadCrumbParticipant- The bread crump that should be set as the currently active
-
getEnableLinkToCurrent
Gets whether the current bread crumb should be displayed as a link (e.g. for refreshing) or as a disabled link (effectively just a label). The latter is the default. Override if you want different behavior.- Returns:
- Whether the current bread crumb should be displayed as a link; this method returns false
-
getSeparatorMarkup
- Returns:
- markup used as a separator between breadcrumbs. By default
/is used, but>>is also a popular choice.
-
newBreadCrumbComponent
protected Component newBreadCrumbComponent(String id, long index, int total, IBreadCrumbParticipant breadCrumbParticipant) Creates a new bread crumb component. That component will be rendered as part of the bread crumbs list (which is a <ul> <li> structure).- Parameters:
id- The component idindex- The index of the bread crumbtotal- The total number of bread crumbs in the current modelbreadCrumbParticipant- the bread crumb- Returns:
- A new bread crumb component
-
onDetach
- Overrides:
onDetachin classMarkupContainer
-