public class DefaultNavComponentBuilder extends NavComponentBuilder<DefaultNavComponentBuilder>
Menu instance.
Supports several attributes for influencing how a menu gets translated, see
NavComponentBuilder.ATTR_ICON, NavComponentBuilder.ATTR_ITEM_VIEW_ELEMENT, NavComponentBuilder.ATTR_LINK_VIEW_ELEMENT.NavComponentBuilder.SeparatorATTR_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| Constructor and Description |
|---|
DefaultNavComponentBuilder() |
| Modifier and Type | Method and Description |
|---|---|
protected com.foreach.across.modules.web.ui.elements.NodeViewElement |
buildMenu(com.foreach.across.modules.web.menu.Menu menuToRender,
com.foreach.across.modules.web.ui.ViewElementBuilderContext builderContext) |
DefaultNavComponentBuilder |
dropDownWither(com.foreach.across.modules.web.ui.ViewElement.WitherSetter<com.foreach.across.modules.web.ui.elements.HtmlViewElement> dropDownWither)
Configure a wither method to be added to each dropdown item being generated.
|
DefaultNavComponentBuilder |
navbar()
Render menu as navbar links.
|
DefaultNavComponentBuilder |
pills()
Render menu as pills.
|
DefaultNavComponentBuilder |
replaceGroupBySelectedItem()
Shorthand for
replaceGroupBySelectedItem(true). |
DefaultNavComponentBuilder |
replaceGroupBySelectedItem(boolean replaceGroup)
If
true, whenever a group has one of its items selected,
the link text for the group will be replaced by the text of the selected item. |
DefaultNavComponentBuilder |
simple()
Render menu with no specific nav style.
|
DefaultNavComponentBuilder |
stacked()
Render menu as stacked pills, with a dropright.
|
DefaultNavComponentBuilder |
tabs()
Render menu as tabs.
|
addHtmlAttributes, addIconAndText, addItemLink, addViewElementIfAttributeExists, createElement, customizeViewElement, customizeViewElement, filter, findFirstIncludedChild, findItemToRender, getFirstNonGroupSelectedItem, htmlAttribute, htmlAttributesOf, includedItems, includePathAsDataAttribute, keepGroupsAsGroup, menu, menu, numberOfChildrenToInclude, shouldIncludeItem, shouldKeepAsGroup, witherAttributebuildLink, linkBuilderescapeHtml, isEscapeHtml, resolveTextElement, toTextElementapply, attribute, attributes, clearAttributes, css, htmlId, removeAttribute, removeCssadd, add, addAll, addFirst, addFirst, sortbuild, configure, customTemplate, elementSupplier, elementSupplier, name, postProcess, postProcessor, registerWebResources, withclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpublic DefaultNavComponentBuilder simple()
public DefaultNavComponentBuilder tabs()
public DefaultNavComponentBuilder pills()
public DefaultNavComponentBuilder stacked()
public DefaultNavComponentBuilder navbar()
public DefaultNavComponentBuilder replaceGroupBySelectedItem()
replaceGroupBySelectedItem(true).public DefaultNavComponentBuilder dropDownWither(com.foreach.across.modules.web.ui.ViewElement.WitherSetter<com.foreach.across.modules.web.ui.elements.HtmlViewElement> dropDownWither)
public DefaultNavComponentBuilder replaceGroupBySelectedItem(boolean replaceGroup)
true, whenever a group has one of its items selected,
the link text for the group will be replaced by the text of the selected item.
Only the url and optional NavComponentBuilder.ATTR_ICON attribute of the selected item will be returned.
Default behaviour is not to do this but it can be user friendly in a tab navigation.replaceGroup - true to replace the group labelprotected com.foreach.across.modules.web.ui.elements.NodeViewElement buildMenu(com.foreach.across.modules.web.menu.Menu menuToRender,
com.foreach.across.modules.web.ui.ViewElementBuilderContext builderContext)
buildMenu in class NavComponentBuilder<DefaultNavComponentBuilder>Copyright © 2020. All rights reserved.