AjaxUpdateContainer Class Reference

Inherits er::ajax::AjaxDynamicElement.

Collaboration diagram for AjaxUpdateContainer:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 AjaxUpdateContainer (String name, NSDictionary associations, WOElement children)
void appendToResponse (WOResponse response, WOContext context)
NSDictionary createAjaxOptions (WOComponent component)
NSMutableDictionary createObserveFieldOptions (WOComponent component)
WOActionResults handleRequest (WORequest request, WOContext context)
WOActionResults invokeAction (WORequest request, WOContext context)
void takeValuesFromRequest (WORequest request, WOContext context)

Static Public Member Functions

static String currentUpdateContainerID ()
static String expandInsertion (String originalInsertion, String beforeDuration, String afterDuration)
static void expandInsertionFromOptions (NSMutableDictionary< String, String > options, IAjaxElement element, WOComponent component)
static boolean hasUpdateContainerID (WORequest request)
static NSDictionary removeDefaultOptions (NSDictionary options)
static void safeUpdateContainerWithID (String updateContainerID, WOContext context)
static void setCurrentUpdateContainerID (String updateContainerID)
static void setUpdateContainerID (WORequest request, String updateContainerID)
static String updateContainerID (WORequest request)
static void updateContainerWithID (String updateContainerID, WOContext context)

Protected Member Functions

String _containerID (WOContext context)
void addRequiredWebResources (WOResponse response, WOContext context)
boolean shouldRenderContainer (WOComponent component)

Static Protected Member Functions

static String updateContainerID (String updateContainerID)
static String updateContainerID (AjaxDynamicElement element, String bindingName, WOComponent component)
static String updateContainerID (AjaxDynamicElement element, WOComponent component)

Static Private Attributes

static final String CURRENT_UPDATE_CONTAINER_ID_KEY = "er.ajax.AjaxUpdateContainer.currentID"


Detailed Description

observeFieldID requires ERExtensions, specifically ERXWOForm

onRefreshComplete the script to execute at the end of refreshing the container action the action to call when this updateContainer refreshes

insertion JavaScript function to evaluate when the update takes place (or effect shortcuts like "Effect.blind", or "Effect.BlindUp") insertionDuration the duration of the before and after insertion animation (if using insertion) beforeInsertionDuration the duration of the before insertion animation (if using insertion) afterInsertionDuration the duration of the after insertion animation (if using insertion) asynchronous set to false to force a synchronous refresh of the container. Defaults to true. optional set to true if you want the container tags to be skipped if this is already in an update container (similar to ERXOptionalForm). If optional is true and there is a container, it's as if this AUC doesn't exist, and only its children will render to the page.

frequency the frequency (in seconds) of a periodic update decay a multiplier (default is one) applied to the frequency if the response of the update is unchanged stopped determines whether a periodic update container loads as stopped.


Constructor & Destructor Documentation

AjaxUpdateContainer ( String  name,
NSDictionary  associations,
WOElement  children 
)


Member Function Documentation

String _containerID ( WOContext  context  )  [protected]

Reimplemented from AjaxDynamicElement.

void addRequiredWebResources ( WOResponse  response,
WOContext  context 
) [protected, virtual]

Adds all required resources.

Implements AjaxDynamicElement.

void appendToResponse ( WOResponse  response,
WOContext  context 
)

Overridden to call addRequiredWebResources(WOResponse, WOContext).

Reimplemented from AjaxDynamicElement.

NSDictionary createAjaxOptions ( WOComponent  component  ) 

NSMutableDictionary createObserveFieldOptions ( WOComponent  component  ) 

static String currentUpdateContainerID (  )  [static]

static String expandInsertion ( String  originalInsertion,
String  beforeDuration,
String  afterDuration 
) [static]

static void expandInsertionFromOptions ( NSMutableDictionary< String, String options,
IAjaxElement  element,
WOComponent  component 
) [static]

WOActionResults handleRequest ( WORequest  request,
WOContext  context 
) [virtual]

Override this method to return the response for an Ajax request.

Parameters:
request 
context 

Implements AjaxDynamicElement.

static boolean hasUpdateContainerID ( WORequest  request  )  [static]

WOActionResults invokeAction ( WORequest  request,
WOContext  context 
)

Execute the request, if it's comming from our action, then invoke the ajax handler and put the key AJAX_REQUEST_KEY in the request userInfo dictionary (request.userInfo()).

Reimplemented from AjaxDynamicElement.

static NSDictionary removeDefaultOptions ( NSDictionary  options  )  [static]

static void safeUpdateContainerWithID ( String  updateContainerID,
WOContext  context 
) [static]

Creates or updates Ajax response so that the indicated AUC will get updated when the response is processed in the browser. If the container element does not exist, does nothing. Adds JavaScript like if ( $('SomeContainerID') != null ) AUC.update('SomeContainerID');

Parameters:
updateContainerID the HTML ID of the element implementing the AUC
context WOContext for response

static void setCurrentUpdateContainerID ( String  updateContainerID  )  [static]

static void setUpdateContainerID ( WORequest  request,
String  updateContainerID 
) [static]

boolean shouldRenderContainer ( WOComponent  component  )  [protected]

void takeValuesFromRequest ( WORequest  request,
WOContext  context 
)

Reimplemented from AjaxDynamicElement.

static String updateContainerID ( String  updateContainerID  )  [static, protected]

static String updateContainerID ( AjaxDynamicElement  element,
String  bindingName,
WOComponent  component 
) [static, protected]

static String updateContainerID ( AjaxDynamicElement  element,
WOComponent  component 
) [static, protected]

static String updateContainerID ( WORequest  request  )  [static]

static void updateContainerWithID ( String  updateContainerID,
WOContext  context 
) [static]

Creates or updates Ajax response so that the indicated AUC will get updated when the response is processed in the browser. Adds JavaScript like AUC.update('SomeContainerID');

Parameters:
updateContainerID the HTML ID of the element implementing the AUC
context WOContext for response


Member Data Documentation

final String CURRENT_UPDATE_CONTAINER_ID_KEY = "er.ajax.AjaxUpdateContainer.currentID" [static, private]


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

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