AjaxResponse Class Reference

Inherits er::extensions::appserver::ERXResponse.

Collaboration diagram for AjaxResponse:

Collaboration graph
[legend]

List of all members.

Classes

class  AjaxResponseDelegate

Public Member Functions

 AjaxResponse (WORequest request, WOContext context)
void appendScriptFooterIfNecessary ()
void appendScriptHeaderIfNecessary ()
WOResponse generateResponse ()
void updateDomElement (String id, Object value)
void updateDomElement (String id, Object value, String numberFormat, String dateFormat, String valueWhenEmpty)

Static Public Member Functions

static void addAjaxResponseAppender (AjaxResponseAppender responseAppender)
static boolean isAjaxUpdatePass (WORequest request)

Static Public Attributes

static final String AJAX_UPDATE_PASS = "_ajaxUpdatePass"

Private Attributes

WOContext _context
WORequest _request

Static Private Attributes

static NSMutableArray _responseAppenders


Detailed Description

AjaxResponse provides support for performing an AjaxUpdate in the same response as an ajax action.

Author:
mschrag

Constructor & Destructor Documentation

AjaxResponse ( WORequest  request,
WOContext  context 
)


Member Function Documentation

static void addAjaxResponseAppender ( AjaxResponseAppender  responseAppender  )  [static]

Add a response appender to the list of response appender. At the end of every AjaxResponse, the AjaxResponseAppenders are given an opportunity to tag along. For instance, if you have an area at the top of your pages that show errors or notifications, you may want all of your ajax responses to have a chance to trigger an update of this area, so you could register an AjaxResponseAppender that renders a javascript block that calls MyNotificationsUpdate() only if there are notifications to be shown. Without response appenders, you would have to include a check in all of your components to do this.

Parameters:
responseAppender the appender to add

void appendScriptFooterIfNecessary (  ) 

Convenience method that calls AjaxUtils.appendScriptFooterIfNecessary with this request.

See also:
AjaxUtils.appendScriptFooterIfNecessary

void appendScriptHeaderIfNecessary (  ) 

Convenience method that calls AjaxUtils.appendScriptHeaderIfNecessary with this request.

See also:
AjaxUtils.appendScriptHeaderIfNecessary

WOResponse generateResponse (  ) 

static boolean isAjaxUpdatePass ( WORequest  request  )  [static]

void updateDomElement ( String  id,
Object  value 
)

Convenience method that calls updateDomElement with no formatters and no valueWhenEmpty string.

void updateDomElement ( String  id,
Object  value,
String  numberFormat,
String  dateFormat,
String  valueWhenEmpty 
)

Convenience method that calls AjaxUtils.updateDomElement with this request.

See also:
AjaxUtils.updateDomElement


Member Data Documentation

WOContext _context [private]

Reimplemented from ERXResponse.

WORequest _request [private]

final String AJAX_UPDATE_PASS = "_ajaxUpdatePass" [static]


The documentation for this class was generated from the following file:

Generated on Sat May 26 06:42:39 2012 for Project Wonder by  doxygen 1.5.8