public abstract class PartialRichCommandMenuItem
extends org.apache.myfaces.trinidad.component.UIXCommand
implements javax.faces.component.behavior.ClientBehaviorHolder
Type | Phases | Description |
---|---|---|
javax.faces.event.ActionEvent |
Invoke Application Apply Request Values |
Event delivered when the "action" of the component has been invoked; for example, by clicking on a button. The action may result in page navigation. |
org.apache.myfaces.trinidad.event.ReturnEvent |
Apply Request Values |
Event delivered when the dialog has completed successfully. |
org.apache.myfaces.trinidad.event.LaunchEvent |
Invoke Application Apply Request Values |
Event delivered to prompt the command to launch a dialog. |
org.apache.myfaces.trinidad.event.AttributeChangeEvent |
Invoke Application Apply Request Values |
Event delivered to describe an attribute change. Attribute change events are not delivered for any programmatic change to a property. They are only delivered when a renderer changes a property without the application's specific request. An example of an attribute change event might include the width of a column that supported client-side resizing. |
Modifier and Type | Field and Description |
---|---|
static org.apache.myfaces.trinidad.bean.PropertyKey |
ACCELERATOR_KEY |
static org.apache.myfaces.trinidad.bean.PropertyKey |
ACCESS_KEY_KEY |
static org.apache.myfaces.trinidad.bean.PropertyKey |
CLIENT_ATTRIBUTES_KEY |
static org.apache.myfaces.trinidad.bean.PropertyKey |
CLIENT_COMPONENT_KEY |
static org.apache.myfaces.trinidad.bean.PropertyKey |
CLIENT_LISTENERS_KEY |
static String |
COMPONENT_FAMILY |
static String |
COMPONENT_TYPE |
static org.apache.myfaces.trinidad.bean.PropertyKey |
CUSTOMIZATION_ID_KEY
Deprecated.
|
static org.apache.myfaces.trinidad.bean.PropertyKey |
DISABLED_KEY |
static org.apache.myfaces.trinidad.bean.PropertyKey |
ICON_KEY |
static org.apache.myfaces.trinidad.bean.PropertyKey |
INLINE_STYLE_KEY |
static org.apache.myfaces.trinidad.bean.PropertyKey |
PARTIAL_SUBMIT_KEY |
static org.apache.myfaces.trinidad.bean.PropertyKey |
PARTIAL_TRIGGERS_KEY |
static org.apache.myfaces.trinidad.bean.PropertyKey |
SELECTED_KEY |
static org.apache.myfaces.trinidad.bean.PropertyKey |
SELECTED_TEXT_KEY |
static org.apache.myfaces.trinidad.bean.PropertyKey |
SHORT_DESC_KEY |
static org.apache.myfaces.trinidad.bean.PropertyKey |
STYLE_CLASS_KEY |
static org.apache.myfaces.trinidad.bean.PropertyKey |
TEXT_KEY |
static org.apache.myfaces.trinidad.bean.FacesBean.Type |
TYPE |
static String |
TYPE_ANTONYM |
static String |
TYPE_CHECK |
static String |
TYPE_DEFAULT |
static org.apache.myfaces.trinidad.bean.PropertyKey |
TYPE_KEY |
static String |
TYPE_RADIO |
static org.apache.myfaces.trinidad.bean.PropertyKey |
UNSECURE_KEY |
static org.apache.myfaces.trinidad.bean.PropertyKey |
USE_WINDOW_KEY |
static org.apache.myfaces.trinidad.bean.PropertyKey |
VISIBLE_KEY |
static String |
WINDOW_EMBED_STYLE_INLINE_DOCUMENT |
static org.apache.myfaces.trinidad.bean.PropertyKey |
WINDOW_EMBED_STYLE_KEY |
static String |
WINDOW_EMBED_STYLE_WINDOW |
static org.apache.myfaces.trinidad.bean.PropertyKey |
WINDOW_HEIGHT_KEY |
static String |
WINDOW_MODALITY_TYPE_APPLICATION_MODAL |
static org.apache.myfaces.trinidad.bean.PropertyKey |
WINDOW_MODALITY_TYPE_KEY |
static String |
WINDOW_MODALITY_TYPE_MODELESS |
static org.apache.myfaces.trinidad.bean.PropertyKey |
WINDOW_WIDTH_KEY |
ACTION_EXPRESSION_KEY, ACTION_LISTENER_KEY, IMMEDIATE_KEY, LAUNCH_LISTENER_KEY, RETURN_LISTENER_KEY
Modifier | Constructor and Description |
---|---|
protected |
PartialRichCommandMenuItem(String rendererType)
Construct an instance of the PartialRichCommandMenuItem.
|
Modifier and Type | Method and Description |
---|---|
void |
addClientBehavior(String eventName, javax.faces.component.behavior.ClientBehavior behavior) |
AWTKeyStroke |
getAccelerator()
Gets the keystroke that will activate this command.
|
char |
getAccessKey()
Gets a character used to gain quick access to this button.
|
protected org.apache.myfaces.trinidad.bean.FacesBean.Type |
getBeanType() |
Set |
getClientAttributes()
Gets a set of client attribute names.
|
Map<String,List<javax.faces.component.behavior.ClientBehavior>> |
getClientBehaviors() |
ClientListenerSet |
getClientListeners()
Gets a set of client listeners.
|
String |
getCustomizationId()
Deprecated.
This attribute is deprecated. This attribute will be removed in the next release. Use the 'id' attribute instead.
|
String |
getDefaultEventName() |
Collection<String> |
getEventNames() |
String |
getFamily() |
String |
getIcon()
Gets the URI of an image to be displayed on the menu item.
|
String |
getInlineStyle()
Gets the CSS styles to use for this component.
|
String[] |
getPartialTriggers()
Gets the IDs of the components that should trigger a partial update.
|
String |
getSelectedText()
Gets the alternate text shown when a type antonym menu item is selected.
|
String |
getShortDesc()
Gets the short description of the component.
|
String |
getStyleClass()
Gets a CSS style class to use for this component.
|
String |
getText()
Gets the text of the item
|
String |
getType()
Gets the type of menu item.
|
Set<String> |
getUnsecure()
Gets A whitespace separated list of attributes whose values ordinarily can be set only on the server, but need to be settable on the client.
|
String |
getWindowEmbedStyle()
Gets Controls the embedded style of launched window.
|
int |
getWindowHeight()
Gets the height of the window, if this command is used to launch a window.
|
String |
getWindowModalityType()
Gets Controls the modality of the launched Dialog.
|
int |
getWindowWidth()
Gets the width of the window, if this command is used to launch a window.
|
boolean |
isClientComponent()
Gets whether a client-side component will be generated.
|
boolean |
isDisabled()
Gets whether the item should be disabled.
|
boolean |
isPartialSubmit()
Gets whether the action should be done through a partial page submit or not.
|
boolean |
isSelected()
Gets whether the item is selected.
|
boolean |
isUseWindow()
Gets whether processes launched by this command should be launched in a secondary browser dialog window.
|
boolean |
isVisible()
Gets the visibility of the component.
|
void |
setAccelerator(AWTKeyStroke accelerator)
Sets the keystroke that will activate this command.
|
void |
setAccessKey(char accessKey)
Sets a character used to gain quick access to this button.
|
void |
setClientAttributes(Set clientAttributes)
Sets a set of client attribute names.
|
void |
setClientComponent(boolean clientComponent)
Sets whether a client-side component will be generated.
|
void |
setClientListeners(ClientListenerSet clientListeners)
Sets a set of client listeners.
|
void |
setCustomizationId(String customizationId)
Deprecated.
This attribute is deprecated. This attribute will be removed in the next release. Use the 'id' attribute instead.
|
void |
setDisabled(boolean disabled)
Sets whether the item should be disabled.
|
void |
setIcon(String icon)
Sets the URI of an image to be displayed on the menu item.
|
void |
setInlineStyle(String inlineStyle)
Sets the CSS styles to use for this component.
|
void |
setPartialSubmit(boolean partialSubmit)
Sets whether the action should be done through a partial page submit or not.
|
void |
setPartialTriggers(String[] partialTriggers)
Sets the IDs of the components that should trigger a partial update.
|
void |
setSelected(boolean selected)
Sets whether the item is selected.
|
void |
setSelectedText(String selectedText)
Sets the alternate text shown when a type antonym menu item is selected.
|
void |
setShortDesc(String shortDesc)
Sets the short description of the component.
|
void |
setStyleClass(String styleClass)
Sets a CSS style class to use for this component.
|
void |
setText(String text)
Sets the text of the item
|
void |
setType(String type)
Sets the type of menu item.
|
void |
setUnsecure(Set<String> unsecure)
Sets A whitespace separated list of attributes whose values ordinarily can be set only on the server, but need to be settable on the client.
|
void |
setUseWindow(boolean useWindow)
Sets whether processes launched by this command should be launched in a secondary browser dialog window.
|
void |
setVisible(boolean visible)
Sets the visibility of the component.
|
void |
setWindowEmbedStyle(String windowEmbedStyle)
Sets Controls the embedded style of launched window.
|
void |
setWindowHeight(int windowHeight)
Sets the height of the window, if this command is used to launch a window.
|
void |
setWindowModalityType(String windowModalityType)
Sets Controls the modality of the launched Dialog.
|
void |
setWindowWidth(int windowWidth)
Sets the width of the window, if this command is used to launch a window.
|
addActionListener, addLaunchListener, addReturnListener, broadcast, getAction, getActionExpression, getActionListener, getActionListeners, getLaunchListener, getLaunchListeners, getReturnListener, getReturnListeners, isImmediate, queueEvent, removeActionListener, removeLaunchListener, removeReturnListener, setAction, setActionExpression, setActionListener, setImmediate, setLaunchListener, setLaunchListener, setReturnListener, setReturnListener
adaptMethodBinding, addAttributeChange, addAttributeChangeListener, addComponentChange, addComponentChange, addComponentChangeFilter, addFacesListener, broadcastToMethodBinding, broadcastToMethodExpression, clearCachedClientIds, clearInitialState, createFacesBean, decode, decodeChildren, decodeChildrenImpl, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributeChangeListener, getAttributeChangeListeners, getAttributes, getBooleanProperty, getChildCount, getChildren, getClientId, getComponentChangeFilters, getContainerClientId, getFacesBean, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacetNames, getFacets, getFacetsAndChildren, getId, getIntProperty, getLifecycleRenderer, getListenersForEventClass, getParent, getProperty, getPropertyKey, getRenderedFacetsAndChildren, getRenderer, getRendererType, getRendersChildren, getValueBinding, getValueExpression, initialStateMarked, invokeOnChildrenComponents, invokeOnComponent, invokeOnNamingContainerComponent, isRendered, isTransient, markInitialState, processDecodes, processRestoreState, processSaveState, processUpdates, processValidators, removeAttributeChangeListener, removeComponentChangeFilter, removeFacesListener, restoreState, satisfiesPartialTrigger, saveState, setAttributeChangeListener, setAttributeChangeListener, setBooleanProperty, setId, setIntProperty, setParent, setProperty, setRendered, setRendererType, setTransient, setupFlattenedChildrenContext, setupFlattenedContext, setValueBinding, setValueExpression, subscribeToEvent, tearDownFlattenedChildrenContext, tearDownFlattenedContext, toString, unsubscribeFromEvent, updateChildren, updateChildrenImpl, validateChildren, validateChildrenImpl
addPartialTarget, broadcastInContext, clearCachedClientIds, defaultGetRenderedFacetsAndChildren, encodeFlattenedChild, encodeFlattenedChildren, getLogicalParent, getLogicalParent, getStateHelper, getStateHelper, isVisitable, partialEncodeVisit, processFlattenedChildren, processFlattenedChildren, processFlattenedChildren, processFlattenedChildren, setPartialTarget, setupChildrenEncodingContext, setupChildrenVisitingContext, setupEncodingContext, setUpEncodingContext, setupVisitingContext, tearDownChildrenEncodingContext, tearDownChildrenVisitingContext, tearDownEncodingContext, tearDownVisitingContext, visitAllChildren, visitChildren, visitChildren, visitTree, visitTree
encodeAll, getClientId, getCompositeComponentParent, getContainerClientId, getCurrentComponent, getCurrentCompositeComponent, getNamingContainer, getResourceBundleMap, getTransientStateHelper, getTransientStateHelper, isCompositeComponent, isInView, popComponentFromEL, processEvent, pushComponentToEL, restoreTransientState, saveTransientState, setInView
public static final String TYPE_DEFAULT
public static final String TYPE_CHECK
public static final String TYPE_RADIO
public static final String TYPE_ANTONYM
public static final String WINDOW_MODALITY_TYPE_APPLICATION_MODAL
public static final String WINDOW_MODALITY_TYPE_MODELESS
public static final String WINDOW_EMBED_STYLE_WINDOW
public static final String WINDOW_EMBED_STYLE_INLINE_DOCUMENT
public static final org.apache.myfaces.trinidad.bean.FacesBean.Type TYPE
public static final org.apache.myfaces.trinidad.bean.PropertyKey TEXT_KEY
public static final org.apache.myfaces.trinidad.bean.PropertyKey DISABLED_KEY
public static final org.apache.myfaces.trinidad.bean.PropertyKey ACCESS_KEY_KEY
public static final org.apache.myfaces.trinidad.bean.PropertyKey PARTIAL_SUBMIT_KEY
public static final org.apache.myfaces.trinidad.bean.PropertyKey ICON_KEY
public static final org.apache.myfaces.trinidad.bean.PropertyKey SELECTED_KEY
public static final org.apache.myfaces.trinidad.bean.PropertyKey SELECTED_TEXT_KEY
public static final org.apache.myfaces.trinidad.bean.PropertyKey TYPE_KEY
public static final org.apache.myfaces.trinidad.bean.PropertyKey ACCELERATOR_KEY
public static final org.apache.myfaces.trinidad.bean.PropertyKey INLINE_STYLE_KEY
public static final org.apache.myfaces.trinidad.bean.PropertyKey STYLE_CLASS_KEY
public static final org.apache.myfaces.trinidad.bean.PropertyKey SHORT_DESC_KEY
public static final org.apache.myfaces.trinidad.bean.PropertyKey UNSECURE_KEY
public static final org.apache.myfaces.trinidad.bean.PropertyKey VISIBLE_KEY
@Deprecated public static final org.apache.myfaces.trinidad.bean.PropertyKey CUSTOMIZATION_ID_KEY
public static final org.apache.myfaces.trinidad.bean.PropertyKey CLIENT_COMPONENT_KEY
public static final org.apache.myfaces.trinidad.bean.PropertyKey CLIENT_ATTRIBUTES_KEY
public static final org.apache.myfaces.trinidad.bean.PropertyKey PARTIAL_TRIGGERS_KEY
public static final org.apache.myfaces.trinidad.bean.PropertyKey CLIENT_LISTENERS_KEY
public static final org.apache.myfaces.trinidad.bean.PropertyKey USE_WINDOW_KEY
public static final org.apache.myfaces.trinidad.bean.PropertyKey WINDOW_MODALITY_TYPE_KEY
public static final org.apache.myfaces.trinidad.bean.PropertyKey WINDOW_EMBED_STYLE_KEY
public static final org.apache.myfaces.trinidad.bean.PropertyKey WINDOW_HEIGHT_KEY
public static final org.apache.myfaces.trinidad.bean.PropertyKey WINDOW_WIDTH_KEY
public static final String COMPONENT_FAMILY
public static final String COMPONENT_TYPE
protected PartialRichCommandMenuItem(String rendererType)
public final String getText()
public final void setText(String text)
text
- the new text valuepublic final boolean isDisabled()
public final void setDisabled(boolean disabled)
disabled
- the new disabled valuepublic final char getAccessKey()
If the same access key appears in multiple input fields in the same page of output, the rendering user agent will cycle among the elements accessed by the similar keys. Note that user agents are inconsistent about dealing with two links having same access key, and so the cycling behavior is dependent on what the user agent provides.
This attribute is sometimes referred to as the "mnemonic".
The character specified by this attribute must exist in the Text
attribute of this button instance. If it does not, the user will receive no visual indication of the existence of the accessKey. The easiest, and most convenient way to specify both the text and the mnemonic together is to use textAndAccessKey.
Note that the accessKey is triggered by browser-specific and platform-specific modifier keys. It even has browser-specific meaning. For example, Internet Explorer will set focus when you press Alt+<accessKey>. Firefox sets focus on some operating systems when you press Alt+Shift+<accessKey>. Firefox on other operating systems sets focus when you press Control+<accessKey>. Refer to your browser's documentation for how it treats access keys.
Beyond normal type menu access key behavior, menus and commandMenuItems support menu-type access key behavior when the focus is currently in a menu or menuBar. Menu-type access key behavior allows access to contained menus, submenus, and commandMenuItems without the need for any keyboard modifiers. When the focus is inside a menu or menuBar, you can simply press the accessKey, without modifiers, for a menu or commandMenuItem accessible within the menu or menuBar to immediately move focus to that menu item.
public final void setAccessKey(char accessKey)
If the same access key appears in multiple input fields in the same page of output, the rendering user agent will cycle among the elements accessed by the similar keys. Note that user agents are inconsistent about dealing with two links having same access key, and so the cycling behavior is dependent on what the user agent provides.
This attribute is sometimes referred to as the "mnemonic".
The character specified by this attribute must exist in the Text
attribute of this button instance. If it does not, the user will receive no visual indication of the existence of the accessKey. The easiest, and most convenient way to specify both the text and the mnemonic together is to use textAndAccessKey.
Note that the accessKey is triggered by browser-specific and platform-specific modifier keys. It even has browser-specific meaning. For example, Internet Explorer will set focus when you press Alt+<accessKey>. Firefox sets focus on some operating systems when you press Alt+Shift+<accessKey>. Firefox on other operating systems sets focus when you press Control+<accessKey>. Refer to your browser's documentation for how it treats access keys.
Beyond normal type menu access key behavior, menus and commandMenuItems support menu-type access key behavior when the focus is currently in a menu or menuBar. Menu-type access key behavior allows access to contained menus, submenus, and commandMenuItems without the need for any keyboard modifiers. When the focus is inside a menu or menuBar, you can simply press the accessKey, without modifiers, for a menu or commandMenuItem accessible within the menu or menuBar to immediately move focus to that menu item.
accessKey
- the new accessKey valuepublic final boolean isPartialSubmit()
public final void setPartialSubmit(boolean partialSubmit)
partialSubmit
- the new partialSubmit valuepublic final String getIcon()
public final void setIcon(String icon)
icon
- the new icon valuepublic final boolean isSelected()
public final void setSelected(boolean selected)
selected
- the new selected valuepublic final String getSelectedText()
public final void setSelectedText(String selectedText)
selectedText
- the new selectedText valuepublic final String getType()
The check type displays a check mark next to it when it is selected. It is useful to represent a boolean toggle.
The radio type displays a radio button next to it when it is selected. It is useful to represent a multiple choice toggle. Radio type menu items are considered part of the same group by their container, either menu or group. When a radio type menu item is selected, other radio type menu items in the same group are unselected.
The antonym type displays different text depending on its selection state. When it is not selected, it displays its text value. When it is selected, it displays its selectedText value. Please note that if you have a commandMenuItem of type antonym on a menuBar, you should set a partialTrigger on the menuBar that points to the commandMenuItem. This way, when the antonym type commandMenuItem is selected and its text changes, the menuBar will rerender and correctly handle any size changes that effect what fits into overflow.
public final void setType(String type)
The check type displays a check mark next to it when it is selected. It is useful to represent a boolean toggle.
The radio type displays a radio button next to it when it is selected. It is useful to represent a multiple choice toggle. Radio type menu items are considered part of the same group by their container, either menu or group. When a radio type menu item is selected, other radio type menu items in the same group are unselected.
The antonym type displays different text depending on its selection state. When it is not selected, it displays its text value. When it is selected, it displays its selectedText value. Please note that if you have a commandMenuItem of type antonym on a menuBar, you should set a partialTrigger on the menuBar that points to the commandMenuItem. This way, when the antonym type commandMenuItem is selected and its text changes, the menuBar will rerender and correctly handle any size changes that effect what fits into overflow.
type
- the new type valuepublic final AWTKeyStroke getAccelerator()
public final void setAccelerator(AWTKeyStroke accelerator)
accelerator
- the new accelerator valuepublic final String getInlineStyle()
public final void setInlineStyle(String inlineStyle)
inlineStyle
- the new inlineStyle valuepublic final String getStyleClass()
public final void setStyleClass(String styleClass)
styleClass
- the new styleClass valuepublic final String getShortDesc()
For components with images, the shortDesc is often used to render an HTML alt attribute for the image. Please see the accessibility guidelines section for correct alt text usage of the shortDesc attribute.
shortDesc is also commonly used to render an HTML title attribute, which is used by user agents to display tooltip help text. In this case the behavior for the tooltip is controlled by the user agent, e.g. Firefox 2 truncates long tooltips. For form components, the shortDesc is displayed in a note window. For components that support the helpTopicId attribute and are not using the shortDesc as image alt text, it is recommended that helpTopicId is used instead of shortDesc as it is more flexible and provides more accessible descriptive text than the use of the title attribute.
public final void setShortDesc(String shortDesc)
For components with images, the shortDesc is often used to render an HTML alt attribute for the image. Please see the accessibility guidelines section for correct alt text usage of the shortDesc attribute.
shortDesc is also commonly used to render an HTML title attribute, which is used by user agents to display tooltip help text. In this case the behavior for the tooltip is controlled by the user agent, e.g. Firefox 2 truncates long tooltips. For form components, the shortDesc is displayed in a note window. For components that support the helpTopicId attribute and are not using the shortDesc as image alt text, it is recommended that helpTopicId is used instead of shortDesc as it is more flexible and provides more accessible descriptive text than the use of the title attribute.
shortDesc
- the new shortDesc valuepublic final Set<String> getUnsecure()
public final void setUnsecure(Set<String> unsecure)
unsecure
- the new unsecure valuepublic final boolean isVisible()
public final void setVisible(boolean visible)
visible
- the new visible value@Deprecated public final String getCustomizationId()
@Deprecated public final void setCustomizationId(String customizationId)
customizationId
- the new customizationId valuepublic final boolean isClientComponent()
public final void setClientComponent(boolean clientComponent)
clientComponent
- the new clientComponent valuepublic final Set getClientAttributes()
public final void setClientAttributes(Set clientAttributes)
clientAttributes
- the new clientAttributes valuepublic final String[] getPartialTriggers()
public final void setPartialTriggers(String[] partialTriggers)
partialTriggers
- the new partialTriggers valuepublic final ClientListenerSet getClientListeners()
public final void setClientListeners(ClientListenerSet clientListeners)
clientListeners
- the new clientListeners valuepublic final boolean isUseWindow()
public final void setUseWindow(boolean useWindow)
useWindow
- the new useWindow valuepublic final String getWindowModalityType()
public final void setWindowModalityType(String windowModalityType)
windowModalityType
- the new windowModalityType valuepublic final String getWindowEmbedStyle()
public final void setWindowEmbedStyle(String windowEmbedStyle)
windowEmbedStyle
- the new windowEmbedStyle valuepublic final int getWindowHeight()
public final void setWindowHeight(int windowHeight)
windowHeight
- the new windowHeight valuepublic final int getWindowWidth()
public final void setWindowWidth(int windowWidth)
windowWidth
- the new windowWidth valuepublic String getDefaultEventName()
getDefaultEventName
in interface javax.faces.component.behavior.ClientBehaviorHolder
getDefaultEventName
in class org.apache.myfaces.trinidad.component.UIXComponentBase
public Collection<String> getEventNames()
getEventNames
in interface javax.faces.component.behavior.ClientBehaviorHolder
public Map<String,List<javax.faces.component.behavior.ClientBehavior>> getClientBehaviors()
getClientBehaviors
in interface javax.faces.component.behavior.ClientBehaviorHolder
getClientBehaviors
in class org.apache.myfaces.trinidad.component.UIXComponentBase
public void addClientBehavior(String eventName, javax.faces.component.behavior.ClientBehavior behavior)
addClientBehavior
in interface javax.faces.component.behavior.ClientBehaviorHolder
addClientBehavior
in class org.apache.myfaces.trinidad.component.UIXComponentBase
public String getFamily()
getFamily
in class org.apache.myfaces.trinidad.component.UIXCommand
protected org.apache.myfaces.trinidad.bean.FacesBean.Type getBeanType()
getBeanType
in class org.apache.myfaces.trinidad.component.UIXCommand