er.extensions.appserver.navigation
Class ERXModernNavigationMenuItem
java.lang.Object
com.webobjects.appserver.WOElement
com.webobjects.appserver.WOComponent
er.extensions.components.ERXComponent
er.extensions.components.ERXNonSynchronizingComponent
er.extensions.components.ERXStatelessComponent
er.extensions.appserver.navigation.ERXModernNavigationMenuItem
- All Implemented Interfaces:
- WOActionResults, NSKeyValueCoding, NSKeyValueCoding.ErrorHandling, NSKeyValueCodingAdditions, NSValidation, Serializable, Cloneable
public class ERXModernNavigationMenuItem
- extends ERXStatelessComponent
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
- See Also:
- Serialized Form
| Methods inherited from class er.extensions.components.ERXComponent |
_awakeInContext, _checkAccess, _frameworkName, _includeCSSResources, _includeJavascriptResources, additionalCSSFiles, additionalJavascriptFiles, appendToResponse, booleanValueForBinding, booleanValueForBinding, booleanValueForBinding, checkAccess, clickToOpenEnabled, componentName, defaultCSSPath, defaultJavascriptPath, dynamicBindings, floatValueForBinding, intValueForBinding, invokeAction, isPageAccessAllowed, localizer, objectValueForBinding, objectValueForBinding, pageWithName, postAppendToResponse, preAppendToResponse, primaryCSSFile, primaryJavascriptFile, stringValueForBinding, stringValueForBinding, takeValuesFromRequest, useDefaultComponentCSS, useDefaultComponentJavascript |
| Methods inherited from class com.webobjects.appserver.WOComponent |
__valueForBinding, _associationWithName, _childTemplate, _cleanUpStatelessComponent, _componentDefinition, _componentUnroll, _isPage, _setContext, _setIsPage, _setParent, _setSubcomponent, _sleepInContext, _subcomponentForElementWithID, _templateNameForClass, _unroll, application, awake, baseURL, bindingKeys, canAccessFieldsDirectly, canGetValueForBinding, canSetValueForBinding, clone, context, debugString, descriptionForResponse, ensureAwakeInContext, frameworkName, generateResponse, handleQueryWithUnboundKey, handleTakeValueForUnboundKey, hasBinding, hasSession, isCachingEnabled, isEventLoggingEnabled, logString, name, pageWithName, parent, path, pathURL, performParentAction, pullValuesFromParent, pushValuesToParent, session, set_componentUnroll, set_unroll, setCachingEnabled, setValueForBinding, sleep, takeValueForKey, takeValueForKeyPath, template, templateWithHTMLString, templateWithHTMLString, templateWithName, toString, unableToSetNullForKey, validateTakeValueForKeyPath, validateValueForKey, validationFailedWithException, valueForBinding, valueForIntegerBinding, valueForKey, valueForKeyPath, valueForNSArrayBindings, valueForNSDictionaryBindings, valueForNumberBinding, valueForStringBinding |
log
public static final Logger log
- logging support
_navigationItem
protected ERXNavigationItem _navigationItem
_navigationState
protected ERXNavigationState _navigationState
_linkDirectlyToDirectActions
protected boolean _linkDirectlyToDirectActions
_isDisabled
protected Boolean _isDisabled
_meetsDisplayConditions
protected Boolean _meetsDisplayConditions
_isSelected
protected Boolean _isSelected
_hasActivity
protected Boolean _hasActivity
_redirect
protected WOComponent _redirect
aChildItem
public ERXNavigationItem aChildItem
STYLE_CLASS_SELECTED
protected static String STYLE_CLASS_SELECTED
STYLE_CLASS_DISABLED
protected static String STYLE_CLASS_DISABLED
STYLE_CLASS_SUB
protected static String STYLE_CLASS_SUB
SHOULD_DISPLAY_DISABLED_MENU_ITEMS
public static final String SHOULD_DISPLAY_DISABLED_MENU_ITEMS
- See Also:
- Constant Field Values
ERXModernNavigationMenuItem
public ERXModernNavigationMenuItem(WOContext context)
navigationItemID
public String navigationItemID()
reset
public void reset()
- Overrides:
reset in class ERXStatelessComponent
navigationItemWidth
public String navigationItemWidth()
navigationState
public ERXNavigationState navigationState()
directActionRedirect
public 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.
contextComponentActionURL
public String contextComponentActionURL()
menuItemSelected
public 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
meetsDisplayConditions
public 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
shouldDisplay
public 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
navigationItem
public ERXNavigationItem navigationItem()
- Gets the
ERXNavigationItem that provides the backing store for the properties of this menu item.
- Returns:
- the navigation item
isDisabled
public boolean isDisabled()
isSelected
public boolean isSelected()
itemStyleClass
public String itemStyleClass()
resolveValue
public Object resolveValue(String key)
hasActivity
public boolean hasActivity()
hasActivityAndIsEnabled
public boolean hasActivityAndIsEnabled()
displayName
public String displayName()
children
public NSArray children()
navigationContext
public NSKeyValueCodingAdditions navigationContext()
Copyright © 2002 – 2007 Project Wonder.