com.infragistics.faces.menu.component.html
Class HtmlMenuItemCheckmark

java.lang.Object
  extended byjavax.faces.component.UIComponent
      extended byjavax.faces.component.UIComponentBase
          extended bycom.infragistics.faces.shared.component.DataRepeater
              extended bycom.infragistics.faces.menu.component.MenuItem
                  extended bycom.infragistics.faces.menu.component.MenuItemCheckmark
                      extended bycom.infragistics.faces.menu.component.html.HtmlMenuItemCheckmark
All Implemented Interfaces:
javax.faces.component.ActionSource, javax.faces.component.NamingContainer, javax.faces.component.StateHolder, javax.faces.component.ValueHolder

public class HtmlMenuItemCheckmark
extends MenuItemCheckmark

Extends regular menu item to mimic the look and feel of checkmarks or radio buttons.

Checkmark or radio button
By default MenuItemCheckmarks behave as checkmarks. However, they can also behave as radioButtons by calling setRadioButton(true).

Grouped items
Menu items can be grouped by calling MenuItemCheckmark.setGroupName(java.lang.String) so that only one is selectable at a time.

Look and Feel
The look and feel of each menu item can be individually defined.

The table below summarizes which elements can be customized:

Style applied to How to customize it ?
Menu Item Using setStyle(String) and/or setStyleClass(String).
Hovered Menu Item Using setHoverStyleClass(String).


Field Summary
static java.lang.String COMPONENT_FAMILY
           
static java.lang.String COMPONENT_TYPE
           
static java.lang.String RENDERER_TYPE
           
 
Fields inherited from class com.infragistics.faces.shared.component.DataRepeater
DATA_ROW
 
Fields inherited from interface javax.faces.component.NamingContainer
SEPARATOR_CHAR
 
Constructor Summary
HtmlMenuItemCheckmark()
           
 
Method Summary
 java.lang.String getFamily()
           
 java.lang.String getHoverStyleClass()
          Returns the name of the css class applied to the component when the mouse is over it
 java.lang.String getHref()
          Returns the href (url) to navigate-to whenever the user clicks on the command If both action and href are specified, href is used
 java.lang.String getStyle()
          Returns the default Style applied to the component
 java.lang.String getStyleClass()
          Returns the name of the css class applied to the component
 java.lang.String getTarget()
          Returns the target frame and/or window that will receive the result of this action
 void restoreState(javax.faces.context.FacesContext context, java.lang.Object state)
           
 java.lang.Object saveState(javax.faces.context.FacesContext context)
           
 void setHoverStyleClass(java.lang.String cssClass)
          Sets the name of the css class applied to the component when the mouse cursor is over it
 void setHref(java.lang.String href)
          Sets the href (url) to navigate-to whenever the node is clicked-on
 void setStyle(java.lang.String style)
          Sets the default style applied to the component
 void setStyleClass(java.lang.String cssClass)
          Sets the name of the css class applied to the component
 void setTarget(java.lang.String target)
          Sets the target frame and/or window that will receive the result of this action
 
Methods inherited from class com.infragistics.faces.menu.component.MenuItemCheckmark
getGroupName, getOtherItemsInGroup, isChecked, isRadioButton, setChecked, setGroupName, setRadioButton
 
Methods inherited from class com.infragistics.faces.menu.component.MenuItem
addActionListener, broadcast, getAction, getActionListener, getActionListeners, getConverter, getHoverIconUrl, getIconUrl, getLocalValue, getMenu, getShortcut, getSiblings, getTooltip, getValue, isDisabled, isImmediate, isRoot, queueEvent, removeActionListener, setAction, setActionListener, setConverter, setDisabled, setHoverIconUrl, setIconUrl, setImmediate, setShortcut, setTooltip, setValue
 
Methods inherited from class com.infragistics.faces.shared.component.DataRepeater
dataBind, encodeBegin, encodeEnd, getDataKeyName, getDataKeyValue, getDataSource, getTemplateItems, processUpdates, processValidators, setDataKeyName, setDataSource, setValueBinding
 
Methods inherited from class javax.faces.component.UIComponentBase
decode, encodeChildren, findComponent, getAttributes, getChildCount, getChildren, getClientId, getFacet, getFacets, getFacetsAndChildren, getId, getParent, getRendererType, getRendersChildren, getValueBinding, isRendered, isTransient, processDecodes, processRestoreState, processSaveState, restoreAttachedState, saveAttachedState, setId, setParent, setRendered, setRendererType, setTransient
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COMPONENT_FAMILY

public static java.lang.String COMPONENT_FAMILY

COMPONENT_TYPE

public static java.lang.String COMPONENT_TYPE

RENDERER_TYPE

public static java.lang.String RENDERER_TYPE
Constructor Detail

HtmlMenuItemCheckmark

public HtmlMenuItemCheckmark()
Method Detail

getFamily

public java.lang.String getFamily()
Overrides:
getFamily in class MenuItemCheckmark

getHoverStyleClass

public java.lang.String getHoverStyleClass()
Returns the name of the css class applied to the component when the mouse is over it

Returns:
the name of a css class

getHref

public java.lang.String getHref()
Returns the href (url) to navigate-to whenever the user clicks on the command If both action and href are specified, href is used

Returns:
the href property

getStyle

public java.lang.String getStyle()
Returns the default Style applied to the component

Returns:
the css style

getStyleClass

public java.lang.String getStyleClass()
Returns the name of the css class applied to the component

Returns:
the name of a css class

getTarget

public java.lang.String getTarget()
Returns the target frame and/or window that will receive the result of this action

Returns:
the target property

setHoverStyleClass

public void setHoverStyleClass(java.lang.String cssClass)
Sets the name of the css class applied to the component when the mouse cursor is over it

Parameters:
cssClass -

setHref

public void setHref(java.lang.String href)
Sets the href (url) to navigate-to whenever the node is clicked-on

Parameters:
href -

setStyle

public void setStyle(java.lang.String style)
Sets the default style applied to the component

Parameters:
style -

setStyleClass

public void setStyleClass(java.lang.String cssClass)
Sets the name of the css class applied to the component

Parameters:
cssClass -

setTarget

public void setTarget(java.lang.String target)
Sets the target frame and/or window that will receive the result of this action

Parameters:
target -

restoreState

public void restoreState(javax.faces.context.FacesContext context,
                         java.lang.Object state)
Specified by:
restoreState in interface javax.faces.component.StateHolder
Overrides:
restoreState in class MenuItemCheckmark

saveState

public java.lang.Object saveState(javax.faces.context.FacesContext context)
Specified by:
saveState in interface javax.faces.component.StateHolder
Overrides:
saveState in class MenuItemCheckmark