public class DefaultMenuItem extends Object implements MenuItem, UIOutcomeTarget, AjaxSource, Serializable
Modifier and Type | Class and Description |
---|---|
static class |
DefaultMenuItem.Builder |
Constructor and Description |
---|
DefaultMenuItem()
Creates a new menu item without value.
|
DefaultMenuItem(Object value)
Deprecated.
Use
builder() instead. |
DefaultMenuItem(Object value,
String icon)
Deprecated.
Use
builder() instead. |
DefaultMenuItem(Object value,
String icon,
String url)
Deprecated.
Use
builder() instead. |
Modifier and Type | Method and Description |
---|---|
static DefaultMenuItem.Builder |
builder() |
List<javax.faces.component.UIComponent> |
getChildren() |
String |
getClientId() |
String |
getCommand()
A
MethodExpression in the form of a string which is called after the
menu item has been clicked. |
String |
getConfirmationScript() |
String |
getContainerStyle() |
String |
getContainerStyleClass() |
String |
getDelay() |
String |
getForm() |
String |
getFragment() |
SerializableFunction<MenuItem,String> |
getFunction()
Lambda alternative to the
MenuItem.getCommand() . |
String |
getHref() |
String |
getIcon() |
String |
getIconPos() |
String |
getId()
Allows access the id property which is managed and auto-assigned by
callers like menu model implementations and used to identify the element.
|
String |
getOnclick() |
String |
getOncomplete() |
String |
getOnerror() |
String |
getOnstart() |
String |
getOnsuccess() |
String |
getOutcome()
The JSF outcome of a navigation case which is resolved by the configured
NavigationHandler . |
Map<String,List<String>> |
getParams() |
String |
getPartialSubmitFilter() |
String |
getProcess() |
String |
getRel() |
String |
getStyle() |
String |
getStyleClass() |
String |
getTarget() |
int |
getTimeout() |
String |
getTitle() |
String |
getUpdate() |
String |
getUrl()
The URL to redirect to after the menu item has been clicked.
|
Object |
getValue() |
boolean |
isAjax() |
boolean |
isAjaxified() |
boolean |
isAsync() |
boolean |
isDisableClientWindow() |
boolean |
isDisabled() |
boolean |
isDynamic() |
boolean |
isEscape() |
boolean |
isGlobal() |
boolean |
isIgnoreAutoUpdate() |
boolean |
isImmediate() |
boolean |
isIncludeViewParams() |
boolean |
isPartialSubmit() |
boolean |
isPartialSubmitSet() |
boolean |
isRendered() |
boolean |
isResetValues() |
boolean |
isResetValuesSet() |
boolean |
requiresConfirmation() |
void |
setAjax(boolean ajax) |
void |
setAsync(boolean async) |
void |
setCommand(String command) |
void |
setConfirmationScript(String confirmationScript) |
void |
setContainerStyle(String containerStyle) |
void |
setContainerStyleClass(String containerStyleClass) |
void |
setDelay(String delay) |
void |
setDisableClientWindow(boolean disableClientWindow) |
void |
setDisabled(boolean disabled) |
void |
setEscape(boolean escape) |
void |
setForm(String form) |
void |
setFragment(String fragment) |
void |
setFunction(SerializableFunction<MenuItem,String> function) |
void |
setGlobal(boolean global) |
void |
setHref(String href) |
void |
setIcon(String icon) |
void |
setIconPos(String iconPos) |
void |
setId(String id)
Sets the id property which is described in
MenuElement.getId() . |
void |
setIgnoreAutoUpdate(boolean ignoreAutoUpdate) |
void |
setImmediate(boolean immediate) |
void |
setIncludeViewParams(boolean includeViewParams) |
void |
setOnclick(String onclick) |
void |
setOncomplete(String oncomplete) |
void |
setOnerror(String onerror) |
void |
setOnstart(String onstart) |
void |
setOnsuccess(String onsuccess) |
void |
setOutcome(String outcome) |
void |
setParam(String key,
Object value) |
void |
setParams(Map<String,List<String>> params) |
void |
setPartialSubmit(boolean partialSubmit) |
void |
setPartialSubmitFilter(String partialSubmitFilter) |
void |
setProcess(String process) |
void |
setRel(String rel) |
void |
setRendered(boolean rendered) |
void |
setResetValues(boolean resetValues) |
void |
setStyle(String style) |
void |
setStyleClass(String styleClass) |
void |
setTarget(String target) |
void |
setTimeout(int timeout) |
void |
setTitle(String title) |
void |
setUpdate(String update) |
void |
setUrl(String url) |
void |
setValue(Object value) |
boolean |
shouldRenderChildren() |
public DefaultMenuItem()
@Deprecated public DefaultMenuItem(Object value)
builder()
instead.value
- the value of the item used as label@Deprecated public DefaultMenuItem(Object value, String icon)
builder()
instead.value
- the value of the item used as labelicon
- the icon to be displayed next to the labelpublic DefaultMenuItem(Object value, String icon, String url)
builder()
instead.value
- the value of the item used as labelicon
- the icon to be displayed next to the labelurl
- a URL to redirect to after the menu item has been clicked
(specifying a url
which is not null
causes
command
to be ignored) (another form of redirection is provided
by the outcome
property)public String getId()
MenuElement
id
attribute in the generated
XHTML.getId
in interface MenuElement
public void setId(String id)
MenuElement
MenuElement.getId()
. You should
have a good reason to call this if you're not extending, but only using
PrimeFaces.
The property is unrelated to the id
attribute in the generated
XHTML.setId
in interface MenuElement
id
- the id valuepublic String getIconPos()
getIconPos
in interface MenuItem
public void setIconPos(String iconPos)
public void setIcon(String icon)
public void setTitle(String title)
public boolean isDisabled()
isDisabled
in interface MenuItem
public void setDisabled(boolean disabled)
public String getOnclick()
getOnclick
in interface MenuItem
public void setOnclick(String onclick)
public void setStyle(String style)
public String getStyleClass()
getStyleClass
in interface MenuItem
public void setStyleClass(String styleClass)
setStyleClass
in interface MenuItem
public String getHref()
getHref
in interface UIOutcomeTarget
public void setHref(String href)
public String getUrl()
MenuItem
outcome
which 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 a url
which is not null
causes command
to be ignored.public void setUrl(String url)
public void setTarget(String target)
public String getOutcome()
MenuItem
NavigationHandler
. Similar to url
, but url
allows to specify fully qualified URLs.getOutcome
in interface UIOutcomeTarget
getOutcome
in interface MenuItem
public void setOutcome(String outcome)
public void setAjax(boolean ajax)
public void setValue(Object value)
public boolean isIncludeViewParams()
isIncludeViewParams
in interface UIOutcomeTarget
isIncludeViewParams
in interface MenuItem
public void setIncludeViewParams(boolean includeViewParams)
public String getFragment()
getFragment
in interface UIOutcomeTarget
getFragment
in interface MenuItem
public void setFragment(String fragment)
public Map<String,List<String>> getParams()
getParams
in interface UIOutcomeTarget
getParams
in interface MenuItem
public boolean shouldRenderChildren()
shouldRenderChildren
in interface MenuItem
public List<javax.faces.component.UIComponent> getChildren()
getChildren
in interface UIOutcomeTarget
public String getCommand()
MenuItem
MethodExpression
in the form of a string which is called after the
menu item has been clicked. It is ignored when url
is not
null
.getCommand
in interface MenuItem
public void setCommand(String command)
public SerializableFunction<MenuItem,String> getFunction()
MenuItem
MenuItem.getCommand()
.getFunction
in interface MenuItem
public void setFunction(SerializableFunction<MenuItem,String> function)
public boolean isRendered()
isRendered
in interface MenuElement
public void setRendered(boolean rendered)
public String getOnstart()
getOnstart
in interface AjaxSource
public void setOnstart(String onstart)
public String getOnerror()
getOnerror
in interface AjaxSource
public void setOnerror(String onerror)
public String getOnsuccess()
getOnsuccess
in interface AjaxSource
public void setOnsuccess(String onsuccess)
public String getOncomplete()
getOncomplete
in interface AjaxSource
public void setOncomplete(String oncomplete)
public String getUpdate()
getUpdate
in interface AjaxSource
public void setUpdate(String update)
public String getProcess()
getProcess
in interface AjaxSource
public void setProcess(String process)
public boolean isPartialSubmit()
isPartialSubmit
in interface AjaxSource
public void setPartialSubmit(boolean partialSubmit)
public boolean isResetValues()
isResetValues
in interface AjaxSource
public void setResetValues(boolean resetValues)
public boolean isGlobal()
isGlobal
in interface AjaxSource
public void setGlobal(boolean global)
public boolean isAsync()
isAsync
in interface AjaxSource
public void setAsync(boolean async)
public boolean isPartialSubmitSet()
isPartialSubmitSet
in interface AjaxSource
public boolean isResetValuesSet()
isResetValuesSet
in interface AjaxSource
public boolean isIgnoreAutoUpdate()
isIgnoreAutoUpdate
in interface AjaxSource
public void setIgnoreAutoUpdate(boolean ignoreAutoUpdate)
public boolean isImmediate()
isImmediate
in interface MenuItem
public void setImmediate(boolean immediate)
public boolean isAjaxified()
isAjaxified
in interface AjaxSource
public String getDelay()
getDelay
in interface AjaxSource
public void setDelay(String delay)
public boolean isDisableClientWindow()
isDisableClientWindow
in interface UIOutcomeTarget
public void setDisableClientWindow(boolean disableClientWindow)
public String getContainerStyle()
getContainerStyle
in interface MenuItem
public void setContainerStyle(String containerStyle)
public String getContainerStyleClass()
getContainerStyleClass
in interface MenuItem
public void setContainerStyleClass(String containerStyleClass)
public String getClientId()
getClientId
in interface MenuItem
public int getTimeout()
getTimeout
in interface AjaxSource
public void setTimeout(int timeout)
public String getPartialSubmitFilter()
getPartialSubmitFilter
in interface AjaxSource
public void setPartialSubmitFilter(String partialSubmitFilter)
public String getForm()
getForm
in interface AjaxSource
public void setForm(String form)
public String getConfirmationScript()
getConfirmationScript
in interface Confirmable
public void setConfirmationScript(String confirmationScript)
setConfirmationScript
in interface Confirmable
public boolean requiresConfirmation()
requiresConfirmation
in interface Confirmable
public void setEscape(boolean escape)
public void setRel(String rel)
public static DefaultMenuItem.Builder builder()
Copyright © 2020. All rights reserved.