public class RecursiveListBasedMenuPanel extends MenuPanel
<wicket:fragment wicket:id="subMenuType">
<li wicket:id="row"><a wicket:id="link"><wicket:container wicket:id="name">"parentname</wicket:container></a>
<ul> <!-- Sub menu container. Override getSubMenuContainer() to do anything on this -->
<wicket:container wicket:id="children">
<wicket:container wicket:id="subMenu"></wicket:container>
</wicket:container>
</ul>
</li>
</wicket:fragment>
<wicket:container wicket:id="rootLevel">
<wicket:container wicket:id="subMenuFragment" />
</wicket:container>
Modifier and Type | Field and Description |
---|---|
protected boolean |
ignoreNavigableNodeChildren
If true, will optimize by removing children of nodes that are navigable.
|
protected static String[] |
VOID_ARRAY |
Constructor and Description |
---|
RecursiveListBasedMenuPanel(String id,
org.apache.wicket.model.IModel<Menu> model) |
Modifier and Type | Method and Description |
---|---|
protected List<String> |
defineAttributesForLink(MenuItemState state)
Override to customize attributes to Link
|
protected org.apache.wicket.Component |
getLink(String linkComponentName,
MenuItemState state,
org.apache.wicket.markup.html.WebMarkupContainer container)
Create a
Link or a container containing the Link part of the Menu item. |
protected List<MenuItemState> |
getNodeChildStates(MenuItemState menuItemState)
Override to dictate custom strategies on what child elements can be loaded for a given parent
MenuItemState |
protected org.apache.wicket.markup.html.WebMarkupContainer |
getSubMenuContainer(MenuItemState menuItemState,
org.apache.wicket.markup.html.WebMarkupContainer children)
Optional override that returns a wrapper sub menu container over children produced by
recurseAdd(Fragment, MenuItemState) |
boolean |
isIgnoreNavigableNodeChildren()
If true, will optimize by removing children of nodes that are navigable.
|
protected void |
renderMenu()
Main render method called by
MenuPanel .onInitialize |
void |
setIgnoreNavigableNodeChildren(boolean ignoreNavigableNodeChildren)
If true, will optimize by removing children of nodes that are navigable.
|
getModel, onInitialize, setState
onComponentTag, onComponentTagBody, renderHead
newHeaderPartContainer, renderHeadFromAssociatedMarkupFile
getMarkupType, getWebPage, getWebRequest
add, addOrReplace, autoAdd, autoAdd, contains, findMarkupStream, get, get, getAssociatedMarkupStream, getMarkupStream, hasAssociatedMarkup, internalAdd, isTransparentResolver, iterator, iterator, newMarkupResourceStream, onRender, remove, remove, removeAll, renderAll, renderAssociatedMarkup, renderComponentTagBody, renderNext, replace, setDefaultModel, setMarkupStream, size, swap, toString, toString, visitChildren, visitChildren
add, addStateChange, afterRender, beforeRender, callOnBeforeRenderIfNotVisible, checkComponentTag, checkComponentTagAttribute, checkHierarchyChange, configure, continueToOriginalDestination, debug, detach, detachBehaviors, detachModel, detachModels, determineVisibility, error, exceptionMessage, fatal, findPage, findParent, findParentWithAssociatedMarkup, getApplication, getBehaviors, getBehaviors, getBehaviorsRawList, getClassRelativePath, getComponentBorder, getConverter, getConverter, getDefaultModel, getDefaultModelObject, getDefaultModelObjectAsString, getDefaultModelObjectAsString, getEscapeModelStrings, getFeedbackMessage, getFlag, getFlag, getId, getInnermostModel, getInnermostModel, getLocale, getLocalizer, getMarkupAttributes, getMarkupId, getMarkupId, getMarkupIdImpl, getMetaData, getModelComparator, getOutputMarkupId, getOutputMarkupPlaceholderTag, getPage, getPageRelativePath, getParent, getPath, getRenderBodyOnly, getRequest, getRequestCycle, getResponse, getSession, getSizeInBytes, getStatelessHint, getString, getString, getString, getStyle, getVariation, hasBeenRendered, hasErrorMessage, hasFeedbackMessage, info, initModel, internalAttach, internalDetach, internalOnAttach, internalOnDetach, internalOnModelChanged, isActionAuthorized, isAncestorOf, isAttached, isBehaviorAccepted, isEnableAllowed, isEnabled, isEnabledInHierarchy, isIgnoreAttributeModifier, isRenderAllowed, isStateless, isVersioned, isVisibilityAllowed, isVisible, isVisibleInHierarchy, locateMarkupStream, markAttached, markRendering, modelChanged, modelChanging, onAfterRender, onAttach, onBeforeRender, onBeginRequest, onConfigure, onDetach, onEndRequest, onModelChanged, onModelChanging, onRemove, prepareForRender, prepareForRender, redirectToInterceptPage, remove, remove, render, render, renderComponent, renderComponent, renderComponentTag, rendered, renderPlaceholderTag, replaceComponentTagBody, replaceWith, sameInnermostModel, sameInnermostModel, setAuto, setComponentBorder, setDefaultModelObject, setEnabled, setEscapeModelStrings, setFlag, setFlag, setIgnoreAttributeModifier, setMarkupId, setMarkupIdImpl, setMetaData, setOutputMarkupId, setOutputMarkupPlaceholderTag, setRedirect, setRenderBodyOnly, setResponsePage, setResponsePage, setResponsePage, setVersioned, setVisibilityAllowed, setVisible, urlFor, urlFor, urlFor, urlFor, urlFor, urlFor, visitParents, warn, wrap
protected boolean ignoreNavigableNodeChildren
protected static final String[] VOID_ARRAY
protected List<String> defineAttributesForLink(MenuItemState state)
state
- protected org.apache.wicket.Component getLink(String linkComponentName, MenuItemState state, org.apache.wicket.markup.html.WebMarkupContainer container)
Link
or a container containing the Link part of the Menu item.linkComponentName
- as String; this component by default contains a Label
"name"state
- as MenuItemState
protected List<MenuItemState> getNodeChildStates(MenuItemState menuItemState)
MenuItemState
menuItemState
- List
of MenuItemState
protected org.apache.wicket.markup.html.WebMarkupContainer getSubMenuContainer(MenuItemState menuItemState, org.apache.wicket.markup.html.WebMarkupContainer children)
recurseAdd(Fragment, MenuItemState)
menuItemState
- as MenuItemState
children
- as WebMarkupContainer
for childrenWebMarkupContainer
protected void renderMenu()
MenuPanel
.onInitializerenderMenu
in class MenuPanel
public boolean isIgnoreNavigableNodeChildren()
public void setIgnoreNavigableNodeChildren(boolean ignoreNavigableNodeChildren)
Copyright © 2018. All rights reserved.