WebObjects 5.4.2

com.webobjects.directtoweb
Class DefaultHeader

java.lang.Object
  extended by com.webobjects.appserver.WOElement
      extended by com.webobjects.appserver.WOComponent
          extended by com.webobjects.directtoweb.DefaultHeader
All Implemented Interfaces:
WOActionResults, NSKeyValueCoding, NSKeyValueCoding.ErrorHandling, NSKeyValueCodingAdditions, NSValidation, Serializable, Cloneable
Direct Known Subclasses:
BASDefaultHeader, BASSideHeader, WOLHeader

public class DefaultHeader
extends WOComponent

The DefaultHeader class defines the behavior of the menu header in a Direct to Web application. The source code for this class is copied into the MenuHeader.java file in the project of the application.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class com.webobjects.appserver.WOComponent
WOComponent.Event
 
Nested classes/interfaces inherited from interface com.webobjects.foundation.NSKeyValueCodingAdditions
NSKeyValueCodingAdditions.DefaultImplementation, NSKeyValueCodingAdditions.Utility
 
Nested classes/interfaces inherited from interface com.webobjects.foundation.NSValidation
NSValidation.DefaultImplementation, NSValidation.Utility, NSValidation.ValidationException
 
Field Summary
 String entityNameInList
          Is used as a temporary variable by the Entities WOPopupButton.
 
Fields inherited from interface com.webobjects.foundation.NSKeyValueCodingAdditions
KeyPathSeparator
 
Constructor Summary
DefaultHeader(WOContext aContext)
          Constructs a DefaultHeader with the specified context.
 
Method Summary
 WOComponent findEntityAction()
          Is invoked when the user clicks New in the menu bar.
 WOComponent homeAction()
          Is invoked when the user clicks Home in the menu bar.
 boolean isWebAssistantEnabled()
          Returns whether the Web Assistant is enabled.
 WOComponent logout()
          Is invoked when the user clicks Logout in the menu bar.
 String manipulatedEntityName()
          Returns the entity name that the user chooses in the Entities pop-up list in the menu bar.
 WOComponent newObjectAction()
          Is invoked when the user clicks Search in the menu bar.
 void setManipulatedEntityName(String newValue)
          Sets the entity name that the user chooses in the pop-up list in the menu bar.
 WOComponent showWebAssistant()
          Is invoked when the user clicks Customize in the menu bar.
 NSArray visibleEntityNames()
          Returns an NSArray containing the names of the visible entities in the session WOSession.
 
Methods inherited from class com.webobjects.appserver.WOComponent
appendToResponse, application, awake, baseURL, bindingKeys, canAccessFieldsDirectly, canGetValueForBinding, canSetValueForBinding, clone, context, debugString, descriptionForResponse, ensureAwakeInContext, frameworkName, generateResponse, handleQueryWithUnboundKey, handleTakeValueForUnboundKey, hasBinding, hasSession, invokeAction, isCachingEnabled, isEventLoggingEnabled, isStateless, logString, name, pageWithName, parent, path, pathURL, performParentAction, pullValuesFromParent, pushValuesToParent, reset, session, set_componentUnroll, set_unroll, setCachingEnabled, setValueForBinding, setVariableValueForName, sleep, synchronizesVariablesWithBindings, takeValueForKey, takeValueForKeyPath, takeValuesFromRequest, template, templateWithHTMLString, templateWithHTMLString, templateWithHTMLString, templateWithName, toString, unableToSetNullForKey, validateTakeValueForKeyPath, validateValueForKey, validationFailedWithException, valueForBinding, valueForBooleanBinding, valueForIntegerBinding, valueForKey, valueForKeyPath, valueForNSArrayBindings, valueForNSDictionaryBindings, valueForNumberBinding, valueForStringBinding, variableValueForName, variableWithName
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

entityNameInList

public String entityNameInList
Is used as a temporary variable by the Entities WOPopupButton.

Constructor Detail

DefaultHeader

public DefaultHeader(WOContext aContext)
Constructs a DefaultHeader with the specified context.

Parameters:
aContext - - the WOContext.
Method Detail

manipulatedEntityName

public String manipulatedEntityName()
Returns the entity name that the user chooses in the Entities pop-up list in the menu bar.

Returns:
the entity name chosen in the Entities pop-up list.

setManipulatedEntityName

public void setManipulatedEntityName(String newValue)
Sets the entity name that the user chooses in the pop-up list in the menu bar.

Parameters:
newValue - - the entity name chosen in the pop-up list.

visibleEntityNames

public NSArray visibleEntityNames()
Returns an NSArray containing the names of the visible entities in the session WOSession. You can hide entities using the Entities tab in the Web Assistant.

Returns:
an NSArrya of the names of the visible entities in the session.

findEntityAction

public WOComponent findEntityAction()
Is invoked when the user clicks New in the menu bar. Creates an instance of the manipulated entity and displays an edit page for it.

Returns:
an edit page for the new instance of the manipulated entity.
See Also:
DefaultHeader.manipulatedEntityName()

newObjectAction

public WOComponent newObjectAction()
Is invoked when the user clicks Search in the menu bar. Creates and displays a query page for the selected entity.

Returns:
the query page for the selected entity.
See Also:
DefaultHeader.manipulatedEntityName()

logout

public WOComponent logout()
Is invoked when the user clicks Logout in the menu bar. Terminates the current session and returns the home page (Main WOComponent) of the application.

Returns:
the home page.
See Also:
D2W.homeHrefInContext(com.webobjects.appserver.WOContext)

homeAction

public WOComponent homeAction()
Is invoked when the user clicks Home in the menu bar. Displays the startup task page.

Returns:
the startup task page.

showWebAssistant

public WOComponent showWebAssistant()
Is invoked when the user clicks Customize in the menu bar. Displays the Web Assistant in the browser of the user.

Returns:
the WOComponent with the Web Assistant.

isWebAssistantEnabled

public boolean isWebAssistantEnabled()
Returns whether the Web Assistant is enabled. By default, it is enabled.

Returns:
true if the Assistant is enabled; false otherwise.

Last updated June 2008

Copyright © 2000-2008 Apple Inc.