Inherits from: NSObject
Conforms to: NSObject
(NSObject)
Declared in: WebObjects/WOContext.h
A WOContext object lets you access objects and information that define the context of a transaction. In a typical request-response loop (a transaction), several objects have a hand in what is going on: the WOApplication and WOSession objects, the page involved in the request or response (a WOComponent object), the page's subcomponents (also WOComponents), plus the dynamic elements on the page. The WOContext object passed as an argument in the takeValuesFromRequest:inContext:, invokeActionForRequest:inContext:, and appendToResponse:inContext: messages allows access to these objects. A context is identified by the context ID, which appears in the URL after the session ID and page name. Each context ID is an integer that the session increments each time a new context is created.
WOContext objects provide other information and services related to the current transaction. From them you can get the entire URL currently in effect as well as portions of that URL, such as the element ID, the context ID, and the URL up to and including the session ID.
A WOContext object plays a further role behind the scenes. For the benefit of a page's dynamic elements, it keeps track of the current component, that is, the WOComponent associated with the current element in the request-handling cycle. The current component can be the WOComponent that represents one of the page's subcomponents or the page itself. By reference to the current component (accessed through WOContext's component method), a dynamic element can exchange values associatively between itself and the WOComponent that contains it.
NSCopying- copy - copyWithZone:
- Creating new object instances
- + contextWithRequest:
- - init
- - initWithRequest:
- Obtaining attributes
- - component
- - contextID
- - elementID
- - hasSession
- - isInForm
- - page
- - request
- - response
- - session
- - session
- - setInForm:
- Manipulating element ID
- - appendElementIDComponent:
- - appendZeroElementIDComponent
- - deleteAllElementIDComponents
- - deleteLastElementIDComponent
- - incrementLastElementIDComponent
- Generating URLs
- - directActionURLForActionNamed:queryDictionary:
- - completeURLWithRequestHandlerKey:path:queryString:isSecure:port:
- - componentActionURL
- - urlWithRequestHandlerKey:path:queryString:
+ (WOContext *)contextWithRequest:(WORequest
*)aRequest
- (void)appendElementIDComponent:(NSString
*)aString
See Also: - deleteAllElementIDComponents, - deleteLastElementIDComponent, - incrementLastElementIDComponent
- (void)appendZeroElementIDComponent
See Also: - deleteAllElementIDComponents, - deleteLastElementIDComponent, - incrementLastElementIDComponent
- (NSString *)completeURLWithRequestHandlerKey:(NSString
*)requestHandlerKey
path:(NSString *)aRequestHandlerPath
queryString:(NSString *)aQueryString
isSecure:(BOOL)isSecure
port:(int)somePort
See Also: - urlWithRequestHandlerKey:path:queryString:
- (WOComponent *)component
See Also: WOComponent class, - page, - request, - response, - session
- (NSString *)componentActionURL
- (NSString *)contextID
- (void)deleteAllElementIDComponents
See Also: - appendElementIDComponent:, - appendZeroElementIDComponent, - incrementLastElementIDComponent
- (void)deleteLastElementIDComponent
See Also: - appendElementIDComponent:, - appendZeroElementIDComponent, - incrementLastElementIDComponent
- (NSString *)directActionURLForActionNamed:(NSString
*)anActionName
queryDictionary:(NSDictionary
*)aQueryDict
See Also: WODirectAction class specification
- (NSString *)elementID
- (BOOL)hasSession
See Also: - session
- (void)incrementLastElementIDComponent
See Also: - appendElementIDComponent:, - appendZeroElementIDComponent, - deleteAllElementIDComponents, - deleteLastElementIDComponent
- (id)init
- (id)initWithRequest:(WORequest
*)aRequest
- (BOOL)isInForm
See Also: setInForm:
- (WOComponent *)page
See Also: - component, - request, - response, - session
- (WORequest *)request
See Also: - component, - page, - response, - session
- (WOResponse *)response
See Also: - component, - page, - response, - session
- (NSString *)senderID
See Also: - initWithRequest:, - request , - uri (WORequest)
- (WOSession *)session
See Also: - component, - page, - request, - response, WOSession class
- (void)setInForm:(BOOL)flag
See Also: isInForm
- (NSString *)urlWithRequestHandlerKey:(NSString
*)requestHandlerKey
path:(NSString *)aRequestHandlerPath
queryString:(NSString *)aQueryString
See Also: - completeURLWithRequestHandlerKey:path:queryString:isSecure:port: