|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.wicket.Component
org.apache.wicket.MarkupContainer
org.apache.wicket.markup.html.WebMarkupContainer
org.apache.wicket.markup.html.WebMarkupContainerWithAssociatedMarkup
org.apache.wicket.markup.html.panel.Panel
org.apache.wicket.extensions.breadcrumb.BreadCrumbBar
public class BreadCrumbBar
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.
Nested Class Summary | |
---|---|
protected class |
BreadCrumbBar.BreadCrumbsListView
List view for rendering the bread crumbs. |
Nested classes/interfaces inherited from class org.apache.wicket.Component |
---|
Component.ComponentModelChange, Component.EnabledChange, Component.IVisitor<T extends Component>, Component.VisibilityChange |
Field Summary |
---|
Fields inherited from class org.apache.wicket.Component |
---|
ENABLE, FLAG_CONFIGURED, FLAG_INITIALIZED, FLAG_REMOVING_FROM_HIERARCHY, FLAG_RESERVED1, FLAG_RESERVED2, FLAG_RESERVED3, FLAG_RESERVED4, FLAG_RESERVED5, FLAG_RESERVED6, FLAG_RESERVED7, FLAG_RESERVED8, PATH_SEPARATOR, RENDER |
Constructor Summary | |
---|---|
BreadCrumbBar(String id)
Construct. |
Method Summary | |
---|---|
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,
int 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. |
Methods inherited from class org.apache.wicket.markup.html.panel.Panel |
---|
onComponentTag, onComponentTagBody, renderHead |
Methods inherited from class org.apache.wicket.markup.html.WebMarkupContainerWithAssociatedMarkup |
---|
newHeaderPartContainer, renderHeadFromAssociatedMarkupFile |
Methods inherited from class org.apache.wicket.markup.html.WebMarkupContainer |
---|
getMarkupType, getWebPage, getWebRequest |
Methods inherited from class org.apache.wicket.MarkupContainer |
---|
add, addOrReplace, autoAdd, autoAdd, contains, findMarkupStream, get, get, getAssociatedMarkupStream, getMarkupStream, hasAssociatedMarkup, internalAdd, isTransparentResolver, iterator, iterator, newMarkupResourceStream, onAfterRenderChildren, onRender, remove, remove, removeAll, renderAll, renderAssociatedMarkup, renderComponentTagBody, renderNext, replace, setDefaultModel, setMarkupStream, size, swap, toString, toString, visitChildren, visitChildren |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public BreadCrumbBar(String id)
id
- Component idMethod Detail |
---|
public void addListener(IBreadCrumbModelListener listener)
IBreadCrumbModel
addListener
in interface IBreadCrumbModel
listener
- The listener to addIBreadCrumbModel.addListener(org.apache.wicket.extensions.breadcrumb.IBreadCrumbModelListener)
public List<IBreadCrumbParticipant> allBreadCrumbParticipants()
IBreadCrumbModel
allBreadCrumbParticipants
in interface IBreadCrumbModel
bread crumb
participants
.IBreadCrumbModel.allBreadCrumbParticipants()
public IBreadCrumbParticipant getActive()
IBreadCrumbModel
getActive
in interface IBreadCrumbModel
IBreadCrumbModel.getActive()
public void removeListener(IBreadCrumbModelListener listener)
IBreadCrumbModel
removeListener
in interface IBreadCrumbModel
listener
- The listener to removeIBreadCrumbModel.removeListener(org.apache.wicket.extensions.breadcrumb.IBreadCrumbModelListener)
public 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 activeIBreadCrumbModel.setActive(org.apache.wicket.extensions.breadcrumb.IBreadCrumbParticipant)
protected boolean getEnableLinkToCurrent()
protected String getSeparatorMarkup()
/
is used,
but >>
is also a popular choice.protected Component newBreadCrumbComponent(String id, int 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 crumb
protected void onDetach()
Component
onDetach
in class Component
Component.onDetach()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |