Project Wonder 5.0

er.ajax
Class AjaxUpdateContainer

java.lang.Object
  extended by com.webobjects.appserver.WOElement
      extended by com.webobjects.appserver.WODynamicElement
          extended by com.webobjects.appserver._private.WODynamicGroup
              extended by er.ajax.AjaxDynamicElement
                  extended by er.ajax.AjaxUpdateContainer
All Implemented Interfaces:
IAjaxElement

public class AjaxUpdateContainer
extends AjaxDynamicElement

observeFieldID requires ERExtensions, specifically ERXWOForm

Bindings
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.
           

Field Summary
 
Fields inherited from class er.ajax.AjaxDynamicElement
log
 
Fields inherited from class com.webobjects.appserver.WODynamicElement
_ConstructorParameters
 
Constructor Summary
AjaxUpdateContainer(java.lang.String name, com.webobjects.foundation.NSDictionary associations, com.webobjects.appserver.WOElement children)
           
 
Method Summary
protected  java.lang.String _containerID(com.webobjects.appserver.WOContext context)
           
protected  void addRequiredWebResources(com.webobjects.appserver.WOResponse response, com.webobjects.appserver.WOContext context)
          Adds all required resources.
 void appendToResponse(com.webobjects.appserver.WOResponse response, com.webobjects.appserver.WOContext context)
          Overridden to call AjaxDynamicElement.addRequiredWebResources(WOResponse, WOContext).
 com.webobjects.foundation.NSDictionary createAjaxOptions(com.webobjects.appserver.WOComponent component)
           
 com.webobjects.foundation.NSMutableDictionary createObserveFieldOptions(com.webobjects.appserver.WOComponent component)
           
static java.lang.String currentUpdateContainerID()
           
static java.lang.String expandInsertion(java.lang.String originalInsertion, java.lang.String beforeDuration, java.lang.String afterDuration)
           
static void expandInsertionFromOptions(com.webobjects.foundation.NSMutableDictionary<java.lang.String,java.lang.String> options, IAjaxElement element, com.webobjects.appserver.WOComponent component)
           
 com.webobjects.appserver.WOActionResults handleRequest(com.webobjects.appserver.WORequest request, com.webobjects.appserver.WOContext context)
          Override this method to return the response for an Ajax request.
static boolean hasUpdateContainerID(com.webobjects.appserver.WORequest request)
           
 com.webobjects.appserver.WOActionResults invokeAction(com.webobjects.appserver.WORequest request, com.webobjects.appserver.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()).
static com.webobjects.foundation.NSDictionary removeDefaultOptions(com.webobjects.foundation.NSDictionary options)
           
static void safeUpdateContainerWithID(java.lang.String updateContainerID, com.webobjects.appserver.WOContext context)
          Creates or updates Ajax response so that the indicated AUC will get updated when the response is processed in the browser.
static void setCurrentUpdateContainerID(java.lang.String updateContainerID)
           
static void setUpdateContainerID(com.webobjects.appserver.WORequest request, java.lang.String updateContainerID)
           
protected  boolean shouldRenderContainer(com.webobjects.appserver.WOComponent component)
           
 void takeValuesFromRequest(com.webobjects.appserver.WORequest request, com.webobjects.appserver.WOContext context)
           
protected static java.lang.String updateContainerID(AjaxDynamicElement element, java.lang.String bindingName, com.webobjects.appserver.WOComponent component)
           
protected static java.lang.String updateContainerID(AjaxDynamicElement element, com.webobjects.appserver.WOComponent component)
           
protected static java.lang.String updateContainerID(java.lang.String updateContainerID)
           
static java.lang.String updateContainerID(com.webobjects.appserver.WORequest request)
           
static void updateContainerWithID(java.lang.String updateContainerID, com.webobjects.appserver.WOContext context)
          Creates or updates Ajax response so that the indicated AUC will get updated when the response is processed in the browser.
 
Methods inherited from class er.ajax.AjaxDynamicElement
addScriptResourceInHead, addScriptResourceInHead, addStylesheetResourceInHead, addStylesheetResourceInHead, appendTagAttributeToResponse, associations, bindingNamed, booleanValueForBinding, hasBinding, setValueForBinding, shouldHandleRequest, stringValueForBinding, valueForBinding, valueForBinding
 
Methods inherited from class com.webobjects.appserver._private.WODynamicGroup
addChildElement, appendChildrenToResponse, childrenElements, EmptyGroup, hasChildrenElements, invokeChildrenAction, takeChildrenValuesFromRequest, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AjaxUpdateContainer

public AjaxUpdateContainer(java.lang.String name,
                           com.webobjects.foundation.NSDictionary associations,
                           com.webobjects.appserver.WOElement children)
Method Detail

addRequiredWebResources

protected void addRequiredWebResources(com.webobjects.appserver.WOResponse response,
                                       com.webobjects.appserver.WOContext context)
Adds all required resources.

Specified by:
addRequiredWebResources in class AjaxDynamicElement

shouldRenderContainer

protected boolean shouldRenderContainer(com.webobjects.appserver.WOComponent component)

takeValuesFromRequest

public void takeValuesFromRequest(com.webobjects.appserver.WORequest request,
                                  com.webobjects.appserver.WOContext context)
Overrides:
takeValuesFromRequest in class AjaxDynamicElement

invokeAction

public com.webobjects.appserver.WOActionResults invokeAction(com.webobjects.appserver.WORequest request,
                                                             com.webobjects.appserver.WOContext context)
Description copied from class: AjaxDynamicElement
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()).

Overrides:
invokeAction in class AjaxDynamicElement

createAjaxOptions

public com.webobjects.foundation.NSDictionary createAjaxOptions(com.webobjects.appserver.WOComponent component)

expandInsertionFromOptions

public static void expandInsertionFromOptions(com.webobjects.foundation.NSMutableDictionary<java.lang.String,java.lang.String> options,
                                              IAjaxElement element,
                                              com.webobjects.appserver.WOComponent component)

expandInsertion

public static java.lang.String expandInsertion(java.lang.String originalInsertion,
                                               java.lang.String beforeDuration,
                                               java.lang.String afterDuration)

removeDefaultOptions

public static com.webobjects.foundation.NSDictionary removeDefaultOptions(com.webobjects.foundation.NSDictionary options)

createObserveFieldOptions

public com.webobjects.foundation.NSMutableDictionary createObserveFieldOptions(com.webobjects.appserver.WOComponent component)

appendToResponse

public void appendToResponse(com.webobjects.appserver.WOResponse response,
                             com.webobjects.appserver.WOContext context)
Description copied from class: AjaxDynamicElement
Overridden to call AjaxDynamicElement.addRequiredWebResources(WOResponse, WOContext).

Overrides:
appendToResponse in class AjaxDynamicElement

handleRequest

public com.webobjects.appserver.WOActionResults handleRequest(com.webobjects.appserver.WORequest request,
                                                              com.webobjects.appserver.WOContext context)
Description copied from class: AjaxDynamicElement
Override this method to return the response for an Ajax request.

Specified by:
handleRequest in interface IAjaxElement
Specified by:
handleRequest in class AjaxDynamicElement

_containerID

protected java.lang.String _containerID(com.webobjects.appserver.WOContext context)
Overrides:
_containerID in class AjaxDynamicElement

updateContainerID

public static java.lang.String updateContainerID(com.webobjects.appserver.WORequest request)

setUpdateContainerID

public static void setUpdateContainerID(com.webobjects.appserver.WORequest request,
                                        java.lang.String updateContainerID)

hasUpdateContainerID

public static boolean hasUpdateContainerID(com.webobjects.appserver.WORequest request)

currentUpdateContainerID

public static java.lang.String currentUpdateContainerID()

setCurrentUpdateContainerID

public static void setCurrentUpdateContainerID(java.lang.String updateContainerID)

updateContainerID

protected static java.lang.String updateContainerID(AjaxDynamicElement element,
                                                    com.webobjects.appserver.WOComponent component)

updateContainerID

protected static java.lang.String updateContainerID(AjaxDynamicElement element,
                                                    java.lang.String bindingName,
                                                    com.webobjects.appserver.WOComponent component)

updateContainerID

protected static java.lang.String updateContainerID(java.lang.String updateContainerID)

updateContainerWithID

public static void updateContainerWithID(java.lang.String updateContainerID,
                                         com.webobjects.appserver.WOContext context)
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

safeUpdateContainerWithID

public static void safeUpdateContainerWithID(java.lang.String updateContainerID,
                                             com.webobjects.appserver.WOContext context)
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

Last updated: Tue, Feb 21, 2017 • 05:45 PM CET

Copyright © 2002 – 2007 Project Wonder.