ERXRedirect Class Reference

Inherits com::webobjects::appserver::WOComponent.

Collaboration diagram for ERXRedirect:

Collaboration graph
[legend]

List of all members.

Public Member Functions

void appendToResponse (WOResponse response, WOContext context)
 ERXRedirect (WOContext context)
void setComponent (WOComponent component)
void setComponentToPage ()
void setDirectActionClass (String directActionClass)
void setDirectActionName (String directActionName)
void setQueryParameters (NSDictionary< String,?extends Object > queryParameters)
void setRequestHandlerKey (String requestHandlerKey)
void setRequestHandlerPath (String requestHandlerPath)
void setSecure (boolean secure)
void setUrl (String url)

Protected Member Functions

String queryParametersString ()

Private Attributes

WOComponent _component
String _directActionClass
String _directActionName
WOComponent _originalComponent
NSDictionary< String,?extends
Object > 
_queryParameters
String _requestHandlerKey
String _requestHandlerPath
Boolean _secure
String _url


Detailed Description

ERXRedirect is like a WORedirect except that you can give it a component instance to redirect to (as well as several other convenient methods of redirecting). This is useful for situations like in an Ajax request where you want to do a full page reload that points to the component that you would normally return from your action method. If your redirect is in an Ajax request, this will generate a script tag that reassigns document.location.href to the generated url.

Author:
mschrag

Constructor & Destructor Documentation

ERXRedirect ( WOContext  context  ) 


Member Function Documentation

void appendToResponse ( WOResponse  response,
WOContext  context 
)

String queryParametersString (  )  [protected]

Returns the query parameters dictionary as a string.

Returns:
the query parameters as a string

void setComponent ( WOComponent  component  ) 

Sets the component instance to redirect to. This component gets replaced as the page in the current context, and a URL is generated to the current context, which causes the request for that context ID to return the component you are redirecting to. When you set a redirect component, the component is also put into the normal page cache (rather than the ajax page cache), and the ajax cache is disabled for this request. As a result, redirecting to a component WILL burn a backtrack cache entry (just like a normal hyperlink).

Parameters:
component the component instance to redirect to

void setComponentToPage (  ) 

Sets the redirect component to be the original page that we were just on.

void setDirectActionClass ( String  directActionClass  ) 

Sets the direct action class to redirect to. You typically want to also set directActionName if you set this.

Parameters:
directActionClass the direct action class to redirect to

void setDirectActionName ( String  directActionName  ) 

The direct action name to redirect to.

Parameters:
directActionName the direct action name

void setQueryParameters ( NSDictionary< String,?extends Object >  queryParameters  ) 

Sets the query parameters for this redirect.

Parameters:
queryParameters the query parameters for this redirect

void setRequestHandlerKey ( String  requestHandlerKey  ) 

Sets the request handler key to redirect to. You typically want to also set requestHandlerPath if you set this.

Parameters:
requestHandlerKey the redirected request handler key

void setRequestHandlerPath ( String  requestHandlerPath  ) 

Sets the request handler path to redirect to. This requires that you also set requestHandlerKey.

Parameters:
requestHandlerPath the request handler path to redirect to

void setSecure ( boolean  secure  ) 

Sets whether or not a secure URL should be generated. This does not apply if you set a URL directly.

Parameters:
secure whether or not a secure URL should be generated

void setUrl ( String  url  ) 

Sets the URL to redirect to.

Parameters:
url the URL to redirect to


Member Data Documentation

WOComponent _component [private]

WOComponent _originalComponent [private]

NSDictionary<String, ? extends Object> _queryParameters [private]

Boolean _secure [private]

String _url [private]


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