public class BreadCrumbBar extends Panel implements IBreadCrumbModel
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.
Modifier and Type | Class and Description |
---|---|
protected class |
BreadCrumbBar.BreadCrumbsListView
List view for rendering the bread crumbs.
|
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 and Description |
---|
BreadCrumbBar(String id)
Construct.
|
Modifier and Type | Method and Description |
---|---|
void |
addListener(IBreadCrumbModelListener listener)
Adds a bread crumb model listener.
|
List<IBreadCrumbParticipant> |
allBreadCrumbParticipants()
Lists the bread crumb participants in this model.
|
IBreadCrumbParticipant |
getActive()
Gets the currently active participant, if any.
|
protected boolean |
getEnableLinkToCurrent()
Gets whether the current bread crumb should be displayed as a link (e.g.
|
protected String |
getSeparatorMarkup() |
protected Component |
newBreadCrumbComponent(String id,
long index,
int total,
IBreadCrumbParticipant breadCrumbParticipant)
Creates a new bread crumb component.
|
protected void |
onDetach()
Called to allow a component to detach resources after use.
|
void |
removeListener(IBreadCrumbModelListener listener)
Removes a bread crumb model listener.
|
void |
setActive(IBreadCrumbParticipant breadCrumbParticipant)
Sets the
bread crumb as the active one. |
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, onInitialize, 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
dequeue, newDequeueContext
forEach, spliterator
public BreadCrumbBar(String id)
id
- Component idpublic void addListener(IBreadCrumbModelListener listener)
IBreadCrumbModel
addListener
in interface IBreadCrumbModel
listener
- The listener to addpublic List<IBreadCrumbParticipant> allBreadCrumbParticipants()
IBreadCrumbModel
allBreadCrumbParticipants
in interface IBreadCrumbModel
bread crumb
participants
.public IBreadCrumbParticipant getActive()
IBreadCrumbModel
getActive
in interface IBreadCrumbModel
public void removeListener(IBreadCrumbModelListener listener)
IBreadCrumbModel
removeListener
in interface IBreadCrumbModel
listener
- The listener to removepublic void setActive(IBreadCrumbParticipant breadCrumbParticipant)
IBreadCrumbModel
bread crumb
as the active one. Implementations should
call bread crumb
added
when the bread crumb was not yet part of the model, and
bread crumb
removed
for every crumb that was removed as the result of this call.setActive
in interface IBreadCrumbModel
breadCrumbParticipant
- The bread crump that should be set as the currently activeprotected boolean getEnableLinkToCurrent()
protected String getSeparatorMarkup()
/
is used,
but >>
is also a popular choice.protected Component newBreadCrumbComponent(String id, long index, int total, IBreadCrumbParticipant breadCrumbParticipant)
id
- The component idindex
- The index of the bread crumbtotal
- The total number of bread crumbs in the current modelbreadCrumbParticipant
- the bread crumbprotected void onDetach()
Component
onDetach
in class MarkupContainer
Copyright © 2006–2022 Apache Software Foundation. All rights reserved.