Class BreadcrumbNavComponentBuilder
java.lang.Object
com.foreach.across.modules.web.ui.ViewElementBuilderSupport<T,SELF>
com.foreach.across.modules.web.ui.elements.builder.ContainerViewElementBuilderSupport<T,SELF>
com.foreach.across.modules.web.ui.elements.builder.AbstractNodeViewElementBuilder<T,SELF>
com.foreach.across.modules.bootstrapui.elements.builder.AbstractHtmlSupportingNodeViewElementBuilder<T,SELF>
com.foreach.across.modules.bootstrapui.elements.builder.AbstractLinkSupportingNodeViewElementBuilder<com.foreach.across.modules.web.ui.elements.NodeViewElement,SELF>
com.foreach.across.modules.bootstrapui.components.builder.NavComponentBuilder<BreadcrumbNavComponentBuilder>
com.foreach.across.modules.bootstrapui.components.builder.BreadcrumbNavComponentBuilder
- All Implemented Interfaces:
com.foreach.across.modules.web.ui.elements.builder.HtmlViewElementBuilder<com.foreach.across.modules.web.ui.elements.NodeViewElement,
,BreadcrumbNavComponentBuilder> com.foreach.across.modules.web.ui.ViewElementBuilder<com.foreach.across.modules.web.ui.elements.NodeViewElement>
public class BreadcrumbNavComponentBuilder
extends NavComponentBuilder<BreadcrumbNavComponentBuilder>
Renders the selected path of a
Menu
to a breadcrumb list.- Since:
- 1.1.0
- Author:
- Arne Vandamme
-
Nested Class Summary
Nested classes/interfaces inherited from class com.foreach.across.modules.bootstrapui.components.builder.NavComponentBuilder
NavComponentBuilder.Separator
Nested classes/interfaces inherited from class com.foreach.across.modules.web.ui.ViewElementBuilderSupport
com.foreach.across.modules.web.ui.ViewElementBuilderSupport.ElementOrBuilder
Nested classes/interfaces inherited from interface com.foreach.across.modules.web.ui.ViewElementBuilder
com.foreach.across.modules.web.ui.ViewElementBuilder.Wither<T extends com.foreach.across.modules.web.ui.ViewElementBuilder>
-
Field Summary
Fields inherited from class com.foreach.across.modules.bootstrapui.components.builder.NavComponentBuilder
ATTR_ICON, ATTR_ICON_ONLY, ATTR_INSERT_SEPARATOR, ATTR_ITEM_VIEW_ELEMENT, ATTR_KEEP_AS_GROUP, ATTR_KEEP_GROUP_ITEM, ATTR_LINK_VIEW_ELEMENT, ATTR_VIEW_ELEMENT_WITHER, CTX_CURRENT_MENU_ITEM
Fields inherited from class com.foreach.across.modules.web.ui.ViewElementBuilderSupport
customTemplate, name
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
addBreadcrumbSegment
(com.foreach.across.modules.web.ui.elements.NodeViewElement list, com.foreach.across.modules.web.menu.Menu item, com.foreach.across.modules.web.ui.ViewElementBuilderContext builderContext, int level, boolean isLastItem) protected LinkViewElement
addItemLink
(com.foreach.across.modules.web.ui.elements.NodeViewElement container, com.foreach.across.modules.web.menu.Menu item, boolean iconAllowed, boolean iconOnly, com.foreach.across.modules.web.ui.ViewElementBuilderContext builderContext) protected com.foreach.across.modules.web.ui.elements.NodeViewElement
buildMenu
(com.foreach.across.modules.web.menu.Menu menu, com.foreach.across.modules.web.ui.ViewElementBuilderContext builderContext) iconAllowedLevels
(int iconLevels) Set the number of levels (breadcrumb segments) for which the icon will be rendered if there is one.iconOnlyLevels
(int iconOnlyLevels) Set the number of levels (breadcrumb segments) that will be rendered as just the icon ifNavComponentBuilder.ATTR_ICON_ONLY
istrue
.Methods inherited from class com.foreach.across.modules.bootstrapui.components.builder.NavComponentBuilder
addHtmlAttributes, addIconAndText, addViewElementIfAttributeExists, createElement, customizeViewElement, customizeViewElement, filter, findFirstIncludedChild, findItemToRender, getFirstNonGroupSelectedItem, htmlAttribute, htmlAttributesOf, includedItems, includePathAsDataAttribute, keepGroupsAsGroup, menu, menu, numberOfChildrenToInclude, shouldIncludeItem, shouldKeepAsGroup, witherAttribute
Methods inherited from class com.foreach.across.modules.bootstrapui.elements.builder.AbstractLinkSupportingNodeViewElementBuilder
buildLink, linkBuilder
Methods inherited from class com.foreach.across.modules.bootstrapui.elements.builder.AbstractHtmlSupportingNodeViewElementBuilder
escapeHtml, isEscapeHtml, resolveTextElement, toTextElement
Methods inherited from class com.foreach.across.modules.web.ui.elements.builder.AbstractNodeViewElementBuilder
apply, attribute, attributes, clearAttributes, css, htmlId, removeAttribute, removeCss
Methods inherited from class com.foreach.across.modules.web.ui.elements.builder.ContainerViewElementBuilderSupport
add, add, addAll, addFirst, addFirst, sort
Methods inherited from class com.foreach.across.modules.web.ui.ViewElementBuilderSupport
build, configure, customTemplate, elementSupplier, elementSupplier, name, postProcess, postProcessor, registerWebResources, with
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.foreach.across.modules.web.ui.elements.builder.HtmlViewElementBuilder
data, removeData
Methods inherited from interface com.foreach.across.modules.web.ui.ViewElementBuilder
andThen, build, doWith, map, map, postProcess, postProcess
-
Constructor Details
-
BreadcrumbNavComponentBuilder
public BreadcrumbNavComponentBuilder()
-
-
Method Details
-
iconAllowedLevels
Set the number of levels (breadcrumb segments) for which the icon will be rendered if there is one. By default all items will have their icons rendered. Set to 0 if you don't want to render any icons.- Parameters:
iconLevels
- number of levels for which icon should be rendered- Returns:
- current builder
- See Also:
-
iconOnlyLevels
-
iconOnlyLevels
Set the number of levels (breadcrumb segments) that will be rendered as just the icon ifNavComponentBuilder.ATTR_ICON_ONLY
istrue
. By default all segments might be rendered this way. Set this attribute to 1 if you want to allow only the root item to be rendered as an icon. Set to 0 if you never want an item to be rendered as only the icon in the breadcrumb.- Parameters:
iconOnlyLevels
- number of levels for which icon should be rendered- Returns:
- current builder
- See Also:
-