org.rcfaces.core.component
Class MenuItemComponent

java.lang.Object
  extended by javax.faces.component.UIComponent
      extended by javax.faces.component.UIComponentBase
          extended by javax.faces.component.UISelectItem
              extended by org.rcfaces.core.internal.component.CameliaItemComponent
                  extended by org.rcfaces.core.component.AbstractItemComponent
                      extended by org.rcfaces.core.component.SelectItemComponent
                          extended by org.rcfaces.core.component.UIImageItemComponent
                              extended by org.rcfaces.core.component.ExpandableItemComponent
                                  extended by org.rcfaces.core.component.MenuItemComponent
All Implemented Interfaces:
StateHolder, IAcceleratorKeyCapability, IAccessKeyCapability, IAlternateTextCapability, IClientDataCapability, IDisabledCapability, IExpandImageCapability, IForegroundBackgroundColorCapability, IImageCapability, IImmediateCapability, IMenuEventCapability, IServerDataCapability, IStatesImageCapability, IStyleClassCapability, ITextCapability, IToolTipCapability, IUnlockedClientAttributesCapability, IVisibilityCapability, org.rcfaces.core.internal.capability.IComponentLifeCycle, org.rcfaces.core.internal.capability.IImageAccessorsCapability, org.rcfaces.core.internal.capability.IRCFacesComponent, org.rcfaces.core.internal.manager.IClientDataManager, org.rcfaces.core.internal.manager.IContainerManager, org.rcfaces.core.internal.manager.IServerDataManager, org.rcfaces.core.internal.manager.ITransientAttributesManager
Direct Known Subclasses:
MenuCheckItemComponent

public class MenuItemComponent
extends ExpandableItemComponent
implements IAccessKeyCapability, IAcceleratorKeyCapability, IStyleClassCapability, IImmediateCapability, IMenuEventCapability

A menu item


Field Summary
protected static Set CAMELIA_ATTRIBUTES
           
static String COMPONENT_TYPE
           
 
Fields inherited from class org.rcfaces.core.internal.component.CameliaItemComponent
engine
 
Fields inherited from class javax.faces.component.UISelectItem
COMPONENT_FAMILY
 
Fields inherited from class javax.faces.component.UIComponent
bindings
 
Constructor Summary
MenuItemComponent()
           
MenuItemComponent(String componentId)
           
 
Method Summary
 void addMenuListener(IMenuListener listener)
          Adds a listener to the component for the menu event
 String getAcceleratorKey()
          Returns a string that indicates the (composed) key used to execute an action from the keyboard.
 String getAcceleratorKey(FacesContext facesContext)
          See getAcceleratorKey() for more details
 String getAccessKey()
          Returns a string that indicates the alphanumeric key used to execute an action from the keyboard (in conjunction with a alteration key ex : Alt).
 String getAccessKey(FacesContext facesContext)
          See getAccessKey() for more details
protected  Set getCameliaFields()
           
 IMenuComponent getMenu()
           
 String getStyleClass()
          Returns the style class of the component.
 String getStyleClass(FacesContext facesContext)
          See getStyleClass() for more details
 boolean isAcceleratorKeySetted()
          Returns true if the attribute "acceleratorKey" is set.
 boolean isAccessKeySetted()
          Returns true if the attribute "accessKey" is set.
 boolean isImmediate()
          Returns a boolean value indicating that this component's value must be converted and validated immediately (that is, during Apply Request Values phase), rather than waiting until Process Validations phase.
 boolean isImmediate(FacesContext facesContext)
          See isImmediate() for more details
 boolean isImmediateSetted()
          Returns true if the attribute "immediate" is set.
 boolean isRemoveAllWhenShown()
          Returns a boolean value specifying wether the content of the component must be remove before the listener is called and the component displayed.
 boolean isRemoveAllWhenShown(FacesContext facesContext)
          Returns a boolean value specifying wether the content of the component must be remove before the listener is called and the component displayed.
 boolean isRemoveAllWhenShownSetted()
          Returns true if the attribute "removeAllWhenShown" is set.
 boolean isStyleClassSetted()
          Returns true if the attribute "styleClass" is set.
 IMenuItemIterator listMenuItems()
           
 FacesListener[] listMenuListeners()
          Returns a list of menu listener for the component
 void removeMenuListener(IMenuListener listener)
          Removes a listener from the component for the menu event
 void setAcceleratorKey(String acceleratorKey)
          Sets a string that indicates the (composed) key used to execute an action from the keyboard.
 void setAccessKey(String accessKey)
          Sets a string that indicates the alphanumeric key used to execute an action from the keyboard (in conjunction with a alteration key ex : Alt).
 void setImmediate(boolean immediate)
          Sets a boolean value indicating that this component's value must be converted and validated immediately (that is, during Apply Request Values phase), rather than waiting until Process Validations phase.
 void setRemoveAllWhenShown(boolean removeAllWhenShown)
          Sets a boolean value specifying wether the content of the component must be remove before the listener is called and the component displayed.
 void setStyleClass(String styleClass)
          Specify the style class of the component.
 
Methods inherited from class org.rcfaces.core.component.ExpandableItemComponent
getBackgroundColor, getBackgroundColor, getExpandedImageURL, getExpandedImageURL, getForegroundColor, getForegroundColor, getText, isBackgroundColorSetted, isExpandedImageURLSetted, isForegroundColorSetted, isTextSetted, setBackgroundColor, setExpandedImageURL, setForegroundColor, setText, setValueExpression
 
Methods inherited from class org.rcfaces.core.component.UIImageItemComponent
getAlternateText, getAlternateText, getDisabledImageURL, getDisabledImageURL, getHoverImageURL, getHoverImageURL, getImageAccessors, getImageAccessors, getImageURL, getImageURL, getSelectedImageURL, getSelectedImageURL, getVisibleState, getVisibleState, isAlternateTextSetted, isDisabledImageURLSetted, isHoverImageURLSetted, isImageURLSetted, isSelectedImageURLSetted, isVisible, isVisible, isVisibleSetted, setAlternateText, setDisabledImageURL, setHoverImageURL, setImageURL, setSelectedImageURL, setVisible
 
Methods inherited from class org.rcfaces.core.component.SelectItemComponent
getToolTip, getToolTipText, getToolTipText, isToolTipTextSetted, setToolTip, setToolTipText
 
Methods inherited from class org.rcfaces.core.component.AbstractItemComponent
getClientData, getClientData, getClientDataCount, getClientDataMap, getClientDataMap, getServerData, getServerData, getServerDataCount, getServerDataMap, getServerDataMap, getUnlockedClientAttributeNames, getUnlockedClientAttributeNames, isDisabled, isDisabledSetted, isUnlockedClientAttributeNamesSetted, listClientDataKeys, listClientDataKeys, listServerDataKeys, listServerDataKeys, removeClientData, removeServerData, setClientData, setClientData, setDisabled, setServerData, setServerData, setUnlockedClientAttributeNames
 
Methods inherited from class org.rcfaces.core.internal.component.CameliaItemComponent
clearListeners, confirmListenerAppend, constructPhase, constructTemplate, decodePhase, encodeBegin, encodeChildren, encodeEnd, getAsyncRenderer, getCameliaValueAlias, getChildren, getChildrenListState, getFamily, getRendererType, getTransientAttribute, getValueExpression, hasDefaultProperties, initializeComponent, initializePhase, isClientRendered, isRendered, isTemplateComponent, processDecodes, processEngineUpdates, processEngineValidators, processUpdates, processValidators, queueEvent, renderPhase, restoreState, saveState, setDefaultProperties, setRendered, setTransientAttribute, toString, updatePhase, validationPhase, verifyAsyncDecode
 
Methods inherited from class javax.faces.component.UISelectItem
getItemDescription, getItemLabel, getItemValue, getValue, isItemDisabled, isItemEscaped, setItemDescription, setItemDisabled, setItemEscaped, setItemLabel, setItemValue, setValue
 
Methods inherited from class javax.faces.component.UIComponentBase
addFacesListener, broadcast, decode, findComponent, getAttributes, getChildCount, getClientId, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getParent, getRenderer, getRendersChildren, getValueBinding, invokeOnComponent, isTransient, processRestoreState, processSaveState, removeFacesListener, restoreAttachedState, saveAttachedState, setId, setParent, setRendered, setRendererType, setTransient, setValueBinding
 
Methods inherited from class javax.faces.component.UIComponent
encodeAll, getContainerClientId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.rcfaces.core.component.capability.IStatesImageCapability
getDisabledImageURL, getHoverImageURL, getSelectedImageURL, setDisabledImageURL, setHoverImageURL, setSelectedImageURL
 
Methods inherited from interface org.rcfaces.core.component.capability.IImageCapability
getImageAccessors, getImageURL, setImageURL
 
Methods inherited from interface org.rcfaces.core.internal.manager.IContainerManager
getChildCount
 

Field Detail

COMPONENT_TYPE

public static final String COMPONENT_TYPE
See Also:
Constant Field Values

CAMELIA_ATTRIBUTES

protected static final Set CAMELIA_ATTRIBUTES
Constructor Detail

MenuItemComponent

public MenuItemComponent()

MenuItemComponent

public MenuItemComponent(String componentId)
Method Detail

getMenu

public IMenuComponent getMenu()

listMenuItems

public IMenuItemIterator listMenuItems()

getAccessKey

public String getAccessKey()
Description copied from interface: IAccessKeyCapability
Returns a string that indicates the alphanumeric key used to execute an action from the keyboard (in conjunction with a alteration key ex : Alt).

Specified by:
getAccessKey in interface IAccessKeyCapability
Returns:
<Any alphanumeric key>

getAccessKey

public String getAccessKey(FacesContext facesContext)
See getAccessKey() for more details


isAccessKeySetted

public final boolean isAccessKeySetted()
Returns true if the attribute "accessKey" is set.

Returns:
true if the attribute is set.

setAccessKey

public void setAccessKey(String accessKey)
Description copied from interface: IAccessKeyCapability
Sets a string that indicates the alphanumeric key used to execute an action from the keyboard (in conjunction with a alteration key ex : Alt).

Specified by:
setAccessKey in interface IAccessKeyCapability
Parameters:
accessKey - <Any alphanumeric key>

getAcceleratorKey

public String getAcceleratorKey()
Description copied from interface: IAcceleratorKeyCapability
Returns a string that indicates the (composed) key used to execute an action from the keyboard.

Specified by:
getAcceleratorKey in interface IAcceleratorKeyCapability
Returns:
[Shift|Alt|Ctrl] + <Any key>

getAcceleratorKey

public String getAcceleratorKey(FacesContext facesContext)
See getAcceleratorKey() for more details


isAcceleratorKeySetted

public final boolean isAcceleratorKeySetted()
Returns true if the attribute "acceleratorKey" is set.

Returns:
true if the attribute is set.

setAcceleratorKey

public void setAcceleratorKey(String acceleratorKey)
Description copied from interface: IAcceleratorKeyCapability
Sets a string that indicates the (composed) key used to execute an action from the keyboard.

Specified by:
setAcceleratorKey in interface IAcceleratorKeyCapability
Parameters:
acceleratorKey - [Shift|Alt|Ctrl] + <Any key>

getStyleClass

public String getStyleClass()
Description copied from interface: IStyleClassCapability
Returns the style class of the component.

Specified by:
getStyleClass in interface IStyleClassCapability
Returns:
style class

getStyleClass

public String getStyleClass(FacesContext facesContext)
See getStyleClass() for more details


isStyleClassSetted

public final boolean isStyleClassSetted()
Returns true if the attribute "styleClass" is set.

Returns:
true if the attribute is set.

setStyleClass

public void setStyleClass(String styleClass)
Description copied from interface: IStyleClassCapability
Specify the style class of the component.

Specified by:
setStyleClass in interface IStyleClassCapability
Parameters:
styleClass - style class

isImmediate

public boolean isImmediate()
Description copied from interface: IImmediateCapability
Returns a boolean value indicating that this component's value must be converted and validated immediately (that is, during Apply Request Values phase), rather than waiting until Process Validations phase.

Specified by:
isImmediate in interface IImmediateCapability
Returns:
boolean

isImmediate

public boolean isImmediate(FacesContext facesContext)
See isImmediate() for more details


isImmediateSetted

public final boolean isImmediateSetted()
Returns true if the attribute "immediate" is set.

Returns:
true if the attribute is set.

setImmediate

public void setImmediate(boolean immediate)
Description copied from interface: IImmediateCapability
Sets a boolean value indicating that this component's value must be converted and validated immediately (that is, during Apply Request Values phase), rather than waiting until Process Validations phase.

Specified by:
setImmediate in interface IImmediateCapability
Parameters:
immediate - boolean

addMenuListener

public final void addMenuListener(IMenuListener listener)
Description copied from interface: IMenuEventCapability
Adds a listener to the component for the menu event

Specified by:
addMenuListener in interface IMenuEventCapability
Parameters:
listener - the menu listener to add

removeMenuListener

public final void removeMenuListener(IMenuListener listener)
Description copied from interface: IMenuEventCapability
Removes a listener from the component for the menu event

Specified by:
removeMenuListener in interface IMenuEventCapability
Parameters:
listener - the menu listener to remove

listMenuListeners

public final FacesListener[] listMenuListeners()
Description copied from interface: IMenuEventCapability
Returns a list of menu listener for the component

Specified by:
listMenuListeners in interface IMenuEventCapability
Returns:
menu listeners' list

isRemoveAllWhenShown

public boolean isRemoveAllWhenShown()
Returns a boolean value specifying wether the content of the component must be remove before the listener is called and the component displayed.

Returns:
true if content is removed when shown

isRemoveAllWhenShown

public boolean isRemoveAllWhenShown(FacesContext facesContext)
Returns a boolean value specifying wether the content of the component must be remove before the listener is called and the component displayed.

Returns:
true if content is removed when shown

setRemoveAllWhenShown

public void setRemoveAllWhenShown(boolean removeAllWhenShown)
Sets a boolean value specifying wether the content of the component must be remove before the listener is called and the component displayed.

Parameters:
removeAllWhenShown - true if content is to be removed when shown

isRemoveAllWhenShownSetted

public boolean isRemoveAllWhenShownSetted()
Returns true if the attribute "removeAllWhenShown" is set.

Returns:
true if the attribute is set.

getCameliaFields

protected Set getCameliaFields()
Overrides:
getCameliaFields in class ExpandableItemComponent


Copyright © 2006-2011 Vedana. All Rights Reserved.