Package org.primefaces.model.menu
Class DefaultMenuItem
java.lang.Object
org.primefaces.model.menu.DefaultMenuItem
- All Implemented Interfaces:
Serializable,AjaxSource,Confirmable,UIOutcomeTarget,MenuElement,MenuItem
public class DefaultMenuItem
extends Object
implements MenuItem, UIOutcomeTarget, AjaxSource, Serializable
- See Also:
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic DefaultMenuItem.Builderbuilder()getBadge()List<javax.faces.component.UIComponent>AMethodExpressionin the form of a string which is called after the menu item has been clicked.getDelay()getForm()Lambda alternative to theMenuItem.getCommand().getHref()getIcon()getId()Allows access the id property which is managed and auto-assigned by callers like menu model implementations and used to identify the element.The JSF outcome of a navigation case which is resolved by the configuredNavigationHandler.getRel()getStyle()intgetTitle()getUrl()The URL to redirect to after the menu item has been clicked.getValue()booleanisAjax()booleanbooleanisAsync()booleanbooleanbooleanbooleanisEscape()booleanisGlobal()booleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanvoidsetAjax(boolean ajax) voidsetAriaLabel(String ariaLabel) voidsetAsync(boolean async) voidvoidsetCommand(String command) voidsetConfirmationScript(String confirmationScript) voidsetContainerStyle(String containerStyle) voidsetContainerStyleClass(String containerStyleClass) voidvoidsetDisableClientWindow(boolean disableClientWindow) voidsetDisabled(boolean disabled) voidsetEscape(boolean escape) voidvoidsetFragment(String fragment) voidsetFunction(SerializableFunction<MenuItem, String> function) voidsetGlobal(boolean global) voidvoidvoidsetIconPos(String iconPos) voidSets the id property which is described inMenuElement.getId().voidsetIgnoreAutoUpdate(boolean ignoreAutoUpdate) voidsetIgnoreComponentNotFound(boolean ignoreComponentNotFound) voidsetImmediate(boolean immediate) voidsetIncludeViewParams(boolean includeViewParams) voidsetOnclick(String onclick) voidsetOncomplete(String oncomplete) voidsetOnerror(String onerror) voidsetOnstart(String onstart) voidsetOnsuccess(String onsuccess) voidsetOutcome(String outcome) voidvoidvoidsetPartialSubmit(boolean partialSubmit) voidsetPartialSubmitFilter(String partialSubmitFilter) voidsetProcess(String process) voidvoidsetRendered(boolean rendered) voidsetResetValues(boolean resetValues) voidvoidsetStyleClass(String styleClass) voidvoidsetTimeout(int timeout) voidvoidvoidvoidboolean
-
Constructor Details
-
DefaultMenuItem
public DefaultMenuItem()Creates a new menu item without value.
-
-
Method Details
-
getId
Description copied from interface:MenuElementAllows access the id property which is managed and auto-assigned by callers like menu model implementations and used to identify the element. The property is unrelated to theidattribute in the generated XHTML.- Specified by:
getIdin interfaceMenuElement- Returns:
- the id property
-
setId
Description copied from interface:MenuElementSets the id property which is described inMenuElement.getId(). You should have a good reason to call this if you're not extending, but only using PrimeFaces. The property is unrelated to theidattribute in the generated XHTML.- Specified by:
setIdin interfaceMenuElement- Parameters:
id- the id value
-
getIcon
-
getIconPos
- Specified by:
getIconPosin interfaceMenuItem
-
setIconPos
-
setIcon
-
getTitle
-
setTitle
-
isDisabled
public boolean isDisabled()- Specified by:
isDisabledin interfaceMenuItem
-
setDisabled
public void setDisabled(boolean disabled) -
getOnclick
- Specified by:
getOnclickin interfaceMenuItem
-
setOnclick
-
getStyle
-
setStyle
-
getStyleClass
- Specified by:
getStyleClassin interfaceMenuItem
-
setStyleClass
- Specified by:
setStyleClassin interfaceMenuItem
-
getHref
- Specified by:
getHrefin interfaceUIOutcomeTarget
-
setHref
-
getUrl
Description copied from interface:MenuItemThe URL to redirect to after the menu item has been clicked. Similar tooutcomewhich allows to specify a navigation case, but the value is not touched (no prepending of the contextPath, not appending the sessionId or windowId), just encoded. Specifying aurlwhich is notnullcausescommandto be ignored. -
setUrl
-
getTarget
-
setTarget
-
getOutcome
Description copied from interface:MenuItemThe JSF outcome of a navigation case which is resolved by the configuredNavigationHandler. Similar tourl, buturlallows to specify fully qualified URLs.- Specified by:
getOutcomein interfaceMenuItem- Specified by:
getOutcomein interfaceUIOutcomeTarget- Returns:
- the outcome.
-
setOutcome
-
isAjax
public boolean isAjax() -
setAjax
public void setAjax(boolean ajax) -
getValue
-
setValue
-
isIncludeViewParams
public boolean isIncludeViewParams()- Specified by:
isIncludeViewParamsin interfaceMenuItem- Specified by:
isIncludeViewParamsin interfaceUIOutcomeTarget
-
setIncludeViewParams
public void setIncludeViewParams(boolean includeViewParams) -
getFragment
- Specified by:
getFragmentin interfaceMenuItem- Specified by:
getFragmentin interfaceUIOutcomeTarget
-
setFragment
-
getParams
- Specified by:
getParamsin interfaceMenuItem- Specified by:
getParamsin interfaceUIOutcomeTarget
-
setParams
-
setParam
-
shouldRenderChildren
public boolean shouldRenderChildren()- Specified by:
shouldRenderChildrenin interfaceMenuItem
-
getChildren
- Specified by:
getChildrenin interfaceUIOutcomeTarget
-
isDynamic
public boolean isDynamic() -
getCommand
Description copied from interface:MenuItemAMethodExpressionin the form of a string which is called after the menu item has been clicked. It is ignored whenurlis notnull.- Specified by:
getCommandin interfaceMenuItem- Returns:
- The outcome, which will be used for navigation.
-
setCommand
-
getFunction
Description copied from interface:MenuItemLambda alternative to theMenuItem.getCommand().- Specified by:
getFunctionin interfaceMenuItem- Returns:
- The outcome, which will be used for navigation.
-
setFunction
-
isRendered
public boolean isRendered()- Specified by:
isRenderedin interfaceMenuElement
-
setRendered
public void setRendered(boolean rendered) -
getOnstart
- Specified by:
getOnstartin interfaceAjaxSource
-
setOnstart
-
getOnerror
- Specified by:
getOnerrorin interfaceAjaxSource
-
setOnerror
-
getOnsuccess
- Specified by:
getOnsuccessin interfaceAjaxSource
-
setOnsuccess
-
getOncomplete
- Specified by:
getOncompletein interfaceAjaxSource
-
setOncomplete
-
getUpdate
- Specified by:
getUpdatein interfaceAjaxSource
-
setUpdate
-
getProcess
- Specified by:
getProcessin interfaceAjaxSource
-
setProcess
-
isPartialSubmit
public boolean isPartialSubmit()- Specified by:
isPartialSubmitin interfaceAjaxSource
-
setPartialSubmit
public void setPartialSubmit(boolean partialSubmit) -
isResetValues
public boolean isResetValues()- Specified by:
isResetValuesin interfaceAjaxSource
-
setResetValues
public void setResetValues(boolean resetValues) -
isGlobal
public boolean isGlobal()- Specified by:
isGlobalin interfaceAjaxSource
-
setGlobal
public void setGlobal(boolean global) -
isAsync
public boolean isAsync()- Specified by:
isAsyncin interfaceAjaxSource
-
setAsync
public void setAsync(boolean async) -
isPartialSubmitSet
public boolean isPartialSubmitSet()- Specified by:
isPartialSubmitSetin interfaceAjaxSource
-
isResetValuesSet
public boolean isResetValuesSet()- Specified by:
isResetValuesSetin interfaceAjaxSource
-
isIgnoreAutoUpdate
public boolean isIgnoreAutoUpdate()- Specified by:
isIgnoreAutoUpdatein interfaceAjaxSource
-
setIgnoreAutoUpdate
public void setIgnoreAutoUpdate(boolean ignoreAutoUpdate) -
isImmediate
public boolean isImmediate()- Specified by:
isImmediatein interfaceMenuItem
-
setImmediate
public void setImmediate(boolean immediate) -
isAjaxified
public boolean isAjaxified()- Specified by:
isAjaxifiedin interfaceAjaxSource
-
getDelay
- Specified by:
getDelayin interfaceAjaxSource
-
setDelay
-
isDisableClientWindow
public boolean isDisableClientWindow()- Specified by:
isDisableClientWindowin interfaceUIOutcomeTarget
-
setDisableClientWindow
public void setDisableClientWindow(boolean disableClientWindow) -
getContainerStyle
- Specified by:
getContainerStylein interfaceMenuItem
-
setContainerStyle
-
getContainerStyleClass
- Specified by:
getContainerStyleClassin interfaceMenuItem
-
setContainerStyleClass
-
getClientId
- Specified by:
getClientIdin interfaceMenuItem
-
getTimeout
public int getTimeout()- Specified by:
getTimeoutin interfaceAjaxSource
-
setTimeout
public void setTimeout(int timeout) -
getPartialSubmitFilter
- Specified by:
getPartialSubmitFilterin interfaceAjaxSource
-
setPartialSubmitFilter
-
getForm
- Specified by:
getFormin interfaceAjaxSource
-
setForm
-
getConfirmationScript
- Specified by:
getConfirmationScriptin interfaceConfirmable
-
setConfirmationScript
- Specified by:
setConfirmationScriptin interfaceConfirmable
-
requiresConfirmation
public boolean requiresConfirmation()- Specified by:
requiresConfirmationin interfaceConfirmable
-
isEscape
public boolean isEscape() -
setEscape
public void setEscape(boolean escape) -
getRel
-
setRel
-
getAriaLabel
- Specified by:
getAriaLabelin interfaceMenuItem
-
setAriaLabel
-
isIgnoreComponentNotFound
public boolean isIgnoreComponentNotFound()- Specified by:
isIgnoreComponentNotFoundin interfaceAjaxSource
-
setIgnoreComponentNotFound
public void setIgnoreComponentNotFound(boolean ignoreComponentNotFound) -
getBadge
-
setBadge
-
builder
-