ERXAjaxApplication Class Reference

Inherits com::webobjects::appserver::WOApplication.

Inherited by ERXApplication.

Collaboration diagram for ERXAjaxApplication:

Collaboration graph
[legend]

List of all members.

Classes

interface  ERXAjaxResponseDelegate

Public Member Functions

WOActionResults invokeAction (WORequest request, WOContext context)
void setResponseDelegate (ERXAjaxResponseDelegate responseDelegate)
void takeValuesFromRequest (WORequest request, WOContext context)

Static Public Member Functions

static String ajaxSubmitButtonName (WORequest request)
static void cleanUpHeaders (WOResponse response)
static boolean forceStorePage (WOMessage message)
static boolean isAjaxReplacement (WORequest request)
static boolean isAjaxRequest (WORequest request)
static boolean isAjaxSubmit (WORequest request)
static boolean isAjaxUpdate (WORequest request)
static String partialFormSenderID (WORequest request)
static void setForceStorePage (WOMessage message)
static boolean shouldIgnoreResults (WORequest request, WOContext context, WOActionResults results)
static boolean shouldNotStorePage (WOContext context)
static boolean shouldNotStorePage (WOMessage message)

Static Public Attributes

static final String KEY_AJAX_SUBMIT_BUTTON = "AJAX_SUBMIT_BUTTON_NAME"
static final String KEY_PARTIAL_FORM_SENDER_ID = "_partialSenderID"
static final String KEY_REPLACED = "_r"
static final String KEY_UPDATE_CONTAINER_ID = "_u"

Private Member Functions

boolean allowContextPageResponse ()

Private Attributes

Boolean _allowContextPageResponse
ERXAjaxResponseDelegate _responseDelegate


Detailed Description

ERXAjaxApplication is the part of ERXApplication that handles Ajax requests. If you want to use the Ajax framework without using other parts of Project Wonder (i.e. ERXSession or ERXApplication), you should steal all of the code in ERXAjaxSession, ERXAjaxApplication, and ERXAjaxContext.

Author:
mschrag

Member Function Documentation

static String ajaxSubmitButtonName ( WORequest  request  )  [static]

Returns the form name of the submitting ajax button.

Parameters:
request the request
Returns:
the form name of the submitting ajax button

boolean allowContextPageResponse (  )  [private]

static void cleanUpHeaders ( WOResponse  response  )  [static]

Removes Ajax response headers that are no longer necessary.

Parameters:
response the response to clean up

static boolean forceStorePage ( WOMessage  message  )  [static]

Checks if the page should not be stored in the cache

WOActionResults invokeAction ( WORequest  request,
WOContext  context 
)

Overridden to allow for redirected responses.

Parameters:
request object
context object

Reimplemented in ERXApplication.

static boolean isAjaxReplacement ( WORequest  request  )  [static]

Returns true if this is an ajax replacement (_r key is set).

static boolean isAjaxRequest ( WORequest  request  )  [static]

Return whether or not the given request is an Ajax request.

Parameters:
request the request the check

static boolean isAjaxSubmit ( WORequest  request  )  [static]

Returns true if this is an ajax submit.

static boolean isAjaxUpdate ( WORequest  request  )  [static]

Returns true if this request will update an AjaxUpdateContainer.

static String partialFormSenderID ( WORequest  request  )  [static]

Returns the form name of the partial form submission.

Parameters:
request the request
Returns:
the form name of the partial form submission

static void setForceStorePage ( WOMessage  message  )  [static]

void setResponseDelegate ( ERXAjaxResponseDelegate  responseDelegate  ) 

Sets the response delegate for this application.

Parameters:
responseDelegate the response delegate

static boolean shouldIgnoreResults ( WORequest  request,
WOContext  context,
WOActionResults  results 
) [static]

static boolean shouldNotStorePage ( WOContext  context  )  [static]

Checks if the page should not be stored in the cache

static boolean shouldNotStorePage ( WOMessage  message  )  [static]

Checks if the page should not be stored in the cache

void takeValuesFromRequest ( WORequest  request,
WOContext  context 
)

Ajax links have a ?_u=xxx&2309482093 in the url which makes it look like a form submission to WebObjects. Therefore takeValues is called on every update even though many many updates aren't submits. This method checks to see if all you have is a _u or _r and an ismap (the #) param for form values. If so, it's not a form submission and takeValues can be skipped.

See also:
com.webobjects.appserver.WOApplication.takeValuesFromRequest(com.webobjects.appserver.WORequest, com.webobjects.appserver.WOContext)
Parameters:
request 
context 


Member Data Documentation

Boolean _allowContextPageResponse [private]

Allow for context.page() as a result to an ajax call. Currently for debugging.

final String KEY_AJAX_SUBMIT_BUTTON = "AJAX_SUBMIT_BUTTON_NAME" [static]

final String KEY_PARTIAL_FORM_SENDER_ID = "_partialSenderID" [static]

final String KEY_REPLACED = "_r" [static]

final String KEY_UPDATE_CONTAINER_ID = "_u" [static]


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