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()
MenuElementid attribute in the generated
XHTML.getId in interface MenuElementpublic void setId(String id)
MenuElementMenuElement.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 MenuElementid - the id valuepublic String getIconPos()
getIconPos in interface MenuItempublic void setIconPos(String iconPos)
public void setIcon(String icon)
public void setTitle(String title)
public boolean isDisabled()
isDisabled in interface MenuItempublic void setDisabled(boolean disabled)
public String getOnclick()
getOnclick in interface MenuItempublic void setOnclick(String onclick)
public void setStyle(String style)
public String getStyleClass()
getStyleClass in interface MenuItempublic void setStyleClass(String styleClass)
setStyleClass in interface MenuItempublic String getHref()
getHref in interface UIOutcomeTargetpublic void setHref(String href)
public String getUrl()
MenuItemoutcome 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()
MenuItemNavigationHandler. Similar to url, but url
allows to specify fully qualified URLs.getOutcome in interface UIOutcomeTargetgetOutcome in interface MenuItempublic void setOutcome(String outcome)
public void setAjax(boolean ajax)
public void setValue(Object value)
public boolean isIncludeViewParams()
isIncludeViewParams in interface UIOutcomeTargetisIncludeViewParams in interface MenuItempublic void setIncludeViewParams(boolean includeViewParams)
public String getFragment()
getFragment in interface UIOutcomeTargetgetFragment in interface MenuItempublic void setFragment(String fragment)
public Map<String,List<String>> getParams()
getParams in interface UIOutcomeTargetgetParams in interface MenuItempublic boolean shouldRenderChildren()
shouldRenderChildren in interface MenuItempublic List<javax.faces.component.UIComponent> getChildren()
getChildren in interface UIOutcomeTargetpublic String getCommand()
MenuItemMethodExpression 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 MenuItempublic void setCommand(String command)
public SerializableFunction<MenuItem,String> getFunction()
MenuItemMenuItem.getCommand().getFunction in interface MenuItempublic void setFunction(SerializableFunction<MenuItem,String> function)
public boolean isRendered()
isRendered in interface MenuElementpublic void setRendered(boolean rendered)
public String getOnstart()
getOnstart in interface AjaxSourcepublic void setOnstart(String onstart)
public String getOnerror()
getOnerror in interface AjaxSourcepublic void setOnerror(String onerror)
public String getOnsuccess()
getOnsuccess in interface AjaxSourcepublic void setOnsuccess(String onsuccess)
public String getOncomplete()
getOncomplete in interface AjaxSourcepublic void setOncomplete(String oncomplete)
public String getUpdate()
getUpdate in interface AjaxSourcepublic void setUpdate(String update)
public String getProcess()
getProcess in interface AjaxSourcepublic void setProcess(String process)
public boolean isPartialSubmit()
isPartialSubmit in interface AjaxSourcepublic void setPartialSubmit(boolean partialSubmit)
public boolean isResetValues()
isResetValues in interface AjaxSourcepublic void setResetValues(boolean resetValues)
public boolean isGlobal()
isGlobal in interface AjaxSourcepublic void setGlobal(boolean global)
public boolean isAsync()
isAsync in interface AjaxSourcepublic void setAsync(boolean async)
public boolean isPartialSubmitSet()
isPartialSubmitSet in interface AjaxSourcepublic boolean isResetValuesSet()
isResetValuesSet in interface AjaxSourcepublic boolean isIgnoreAutoUpdate()
isIgnoreAutoUpdate in interface AjaxSourcepublic void setIgnoreAutoUpdate(boolean ignoreAutoUpdate)
public boolean isImmediate()
isImmediate in interface MenuItempublic void setImmediate(boolean immediate)
public boolean isAjaxified()
isAjaxified in interface AjaxSourcepublic String getDelay()
getDelay in interface AjaxSourcepublic void setDelay(String delay)
public boolean isDisableClientWindow()
isDisableClientWindow in interface UIOutcomeTargetpublic void setDisableClientWindow(boolean disableClientWindow)
public String getContainerStyle()
getContainerStyle in interface MenuItempublic void setContainerStyle(String containerStyle)
public String getContainerStyleClass()
getContainerStyleClass in interface MenuItempublic void setContainerStyleClass(String containerStyleClass)
public String getClientId()
getClientId in interface MenuItempublic int getTimeout()
getTimeout in interface AjaxSourcepublic void setTimeout(int timeout)
public String getPartialSubmitFilter()
getPartialSubmitFilter in interface AjaxSourcepublic void setPartialSubmitFilter(String partialSubmitFilter)
public String getForm()
getForm in interface AjaxSourcepublic void setForm(String form)
public String getConfirmationScript()
getConfirmationScript in interface Confirmablepublic void setConfirmationScript(String confirmationScript)
setConfirmationScript in interface Confirmablepublic boolean requiresConfirmation()
requiresConfirmation in interface Confirmablepublic void setEscape(boolean escape)
public void setRel(String rel)
public static DefaultMenuItem.Builder builder()
Copyright © 2020. All rights reserved.