ERXModernNavigationMenuItem Class Reference

Inherits er::extensions::components::ERXStatelessComponent.

Collaboration diagram for ERXModernNavigationMenuItem:

Collaboration graph
[legend]

List of all members.

Public Member Functions

NSArray children ()
String contextComponentActionURL ()
WOComponent directActionRedirect ()
String displayName ()
 ERXModernNavigationMenuItem (WOContext context)
boolean hasActivity ()
boolean hasActivityAndIsEnabled ()
boolean isDisabled ()
boolean isSelected ()
String itemStyleClass ()
boolean meetsDisplayConditions ()
WOComponent menuItemSelected ()
NSKeyValueCodingAdditions navigationContext ()
ERXNavigationItem navigationItem ()
String navigationItemID ()
String navigationItemWidth ()
ERXNavigationState navigationState ()
void reset ()
Object resolveValue (String key)
boolean shouldDisplay ()

Public Attributes

ERXNavigationItem aChildItem

Static Public Attributes

static final Logger log = Logger.getLogger(ERXNavigationMenuItem.class)
static final String SHOULD_DISPLAY_DISABLED_MENU_ITEMS = "ERXModernNavigationMenuItem.shouldDisplayDisabledMenuItems"

Protected Attributes

Boolean _hasActivity
Boolean _isDisabled
Boolean _isSelected
boolean _linkDirectlyToDirectActions = true
Boolean _meetsDisplayConditions
ERXNavigationItem _navigationItem
ERXNavigationState _navigationState
WOComponent _redirect

Static Protected Attributes

static final String STYLE_CLASS_DISABLED = "disabled"
static final String STYLE_CLASS_SELECTED = "selected"
static final String STYLE_CLASS_SUB = "sub"

Static Private Attributes

static final String EMPTY_STRING = ""


Detailed Description

This is a menu item component that represents a single item in the tree of navigation menu items. It's an updated ERXNavigationMenuItem component that should simplify common usage. Namely, it now recurses through the tree of navigation items, creating nested, unordered lists of navigation items. Just as importantly, with a very few exceptions,it forgoes declaring element style as possible, leaving positioning and styling to be defined in the user's stylesheet.

Please read "Documentation/Navigation.html" to find out how to use the navigation components.

Author:
Travis Cripps

Constructor & Destructor Documentation

ERXModernNavigationMenuItem ( WOContext  context  ) 


Member Function Documentation

NSArray children (  ) 

String contextComponentActionURL (  ) 

WOComponent directActionRedirect (  ) 

AK This is only an experiment: when calling up a DA, we use a component action and redirect to the actual DA

Returns:
a WORedirect to the direct action URL.

String displayName (  ) 

boolean hasActivity (  ) 

boolean hasActivityAndIsEnabled (  ) 

boolean isDisabled (  ) 

boolean isSelected (  ) 

String itemStyleClass (  ) 

boolean meetsDisplayConditions (  ) 

Decides whether the item gets displayed at all. This is done by evaluating the boolean value of a "conditions" array in the definition file. eg: conditions = ("session.user.canEditThisStuff", "session.user.isEditor") will display the item only if the user can edit this stuff *and* is an editor.

Returns:
true if the display conditions are met

WOComponent menuItemSelected (  ) 

Determines whether the menu item is selected, or in the path of the current navigation state.

Returns:
true if the menu item is selected

NSKeyValueCodingAdditions navigationContext (  ) 

ERXNavigationItem navigationItem (  ) 

Gets the ERXNavigationItem that provides the backing store for the properties of this menu item.

Returns:
the navigation item

String navigationItemID (  ) 

String navigationItemWidth (  ) 

ERXNavigationState navigationState (  ) 

void reset (  ) 

Reimplemented from ERXStatelessComponent.

Object resolveValue ( String  key  ) 

boolean shouldDisplay (  ) 

Determines if the item should be displayed in the UI, based upon the disabled status. You may disable display of items that do not meet their display conditions or are explicitly disabled.

Returns:
true if the item should be displayed


Member Data Documentation

Boolean _hasActivity [protected]

Boolean _isDisabled [protected]

Boolean _isSelected [protected]

boolean _linkDirectlyToDirectActions = true [protected]

Boolean _meetsDisplayConditions [protected]

WOComponent _redirect [protected]

final String EMPTY_STRING = "" [static, private]

final Logger log = Logger.getLogger(ERXNavigationMenuItem.class) [static]

logging support

final String SHOULD_DISPLAY_DISABLED_MENU_ITEMS = "ERXModernNavigationMenuItem.shouldDisplayDisabledMenuItems" [static]

final String STYLE_CLASS_DISABLED = "disabled" [static, protected]

final String STYLE_CLASS_SELECTED = "selected" [static, protected]

final String STYLE_CLASS_SUB = "sub" [static, protected]


The documentation for this class was generated from the following file:

Generated on Sat May 26 06:43:02 2012 for Project Wonder by  doxygen 1.5.8