WebObjects 5.4.2

com.webobjects.appserver
Class WORedirect

java.lang.Object
  extended by com.webobjects.appserver.WOElement
      extended by com.webobjects.appserver.WOComponent
          extended by com.webobjects.appserver.WORedirect
All Implemented Interfaces:
WOActionResults, NSKeyValueCoding, NSKeyValueCoding.ErrorHandling, NSKeyValueCodingAdditions, NSValidation, Serializable, Cloneable

public class WORedirect
extends WOComponent

WORedirect is a subclass of WOComponent that may be used to force the user's browser to redirect to another URL. You should only return this component as a response to an action method and never use it in an declarations file directly. This component can be useful, for example, if you have an image map with both static and dynamic actions.

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
 
Fields inherited from interface com.webobjects.foundation.NSKeyValueCodingAdditions
KeyPathSeparator
 
Constructor Summary
WORedirect(WOContext aContext)
          Creates a new WORedirect.
 
Method Summary
 void appendToResponse(WOResponse aResponse, WOContext aContext)
          Adds the redirect to the header of the WOResponse.
 void setUrl(String aString)
          Sets the URL to which the user's browser should be redirected.
 void setURL(String aString)
          Deprecated. : setURL is a deprecated method use instead setUrl.
 String url()
          Return the URL to which the user's browser should be redirected.
 
Methods inherited from class com.webobjects.appserver.WOComponent
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
 

Constructor Detail

WORedirect

public WORedirect(WOContext aContext)
Creates a new WORedirect.

Parameters:
aContext - a WOContext object that represents the context of the transaction
Method Detail

url

public String url()
Return the URL to which the user's browser should be redirected.

Returns:
String representation of the URL

setUrl

public void setUrl(String aString)
Sets the URL to which the user's browser should be redirected.

Parameters:
aString - the URL

setURL

@Deprecated
public void setURL(String aString)
Deprecated. : setURL is a deprecated method use instead setUrl.


appendToResponse

public void appendToResponse(WOResponse aResponse,
                             WOContext aContext)
Adds the redirect to the header of the WOResponse.

Overrides:
appendToResponse in class WOComponent
Parameters:
aResponse - the response being handled
aContext - a WOContext object that represents the context of the transaction
See Also:
WOComponent.invokeAction(WORequest aRequest, WOContext aContext), WOComponent.takeValuesFromRequest(WORequest aRequest, WOContext aContext)

Last updated June 2008

Copyright © 2000-2008 Apple Inc.