public class AjaxUpdateContainer extends AjaxDynamicElement
Name | Description |
---|---|
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. |
ERXDynamicElement.ContextData<T>
log
Constructor and Description |
---|
AjaxUpdateContainer(String name,
NSDictionary<String,com.webobjects.appserver.WOAssociation> associations,
com.webobjects.appserver.WOElement children) |
Modifier and Type | Method and Description |
---|---|
protected String |
_containerID(com.webobjects.appserver.WOContext context)
Override this method and return an update container ID this element should react on.
|
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) . |
NSDictionary |
createAjaxOptions(com.webobjects.appserver.WOComponent component) |
NSMutableDictionary |
createObserveFieldOptions(com.webobjects.appserver.WOComponent component) |
static String |
currentUpdateContainerID() |
static String |
expandInsertion(String originalInsertion,
String beforeDuration,
String afterDuration) |
static void |
expandInsertionFromOptions(NSMutableDictionary<String,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 coming from our action, then invoke the ajax handler and put the key
AJAX_REQUEST_KEY in the request userInfo dictionary (request.userInfo() ). |
static NSDictionary |
removeDefaultOptions(NSDictionary options) |
static void |
safeUpdateContainerWithID(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(String updateContainerID) |
static void |
setUpdateContainerID(com.webobjects.appserver.WORequest request,
String updateContainerID) |
protected boolean |
shouldRenderContainer(com.webobjects.appserver.WOComponent component) |
void |
takeValuesFromRequest(com.webobjects.appserver.WORequest request,
com.webobjects.appserver.WOContext context) |
static String |
updateContainerID(AjaxDynamicElement element,
String bindingName,
com.webobjects.appserver.WOComponent component) |
static String |
updateContainerID(AjaxDynamicElement element,
com.webobjects.appserver.WOComponent component) |
static String |
updateContainerID(String updateContainerID) |
static String |
updateContainerID(com.webobjects.appserver.WORequest request) |
static void |
updateContainerWithID(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.
|
addScriptResourceInHead, addScriptResourceInHead, addStylesheetResourceInHead, addStylesheetResourceInHead, shouldHandleRequest
afterProcessing, appendTagAttributeToResponse, arrayValueForBinding, arrayValueForBinding, associations, beforeProcessing, bindingIsSettable, bindingNamed, booleanValueForBinding, booleanValueForBinding, hasBinding, id, integerValueForBinding, nameInContext, secureInContext, setValueForBinding, stringValueForBinding, stringValueForBinding, valueForBinding, valueForBinding
addChildElement, appendChildrenToResponse, childrenElements, EmptyGroup, hasChildrenElements, invokeChildrenAction, takeChildrenValuesFromRequest, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
valueForBinding, valueForBinding
public AjaxUpdateContainer(String name, NSDictionary<String,com.webobjects.appserver.WOAssociation> associations, com.webobjects.appserver.WOElement children)
protected void addRequiredWebResources(com.webobjects.appserver.WOResponse response, com.webobjects.appserver.WOContext context)
addRequiredWebResources
in class AjaxDynamicElement
response
- the current responsecontext
- context of the transactionprotected boolean shouldRenderContainer(com.webobjects.appserver.WOComponent component)
public void takeValuesFromRequest(com.webobjects.appserver.WORequest request, com.webobjects.appserver.WOContext context)
takeValuesFromRequest
in class com.webobjects.appserver._private.WODynamicGroup
public com.webobjects.appserver.WOActionResults invokeAction(com.webobjects.appserver.WORequest request, com.webobjects.appserver.WOContext context)
AjaxDynamicElement
AJAX_REQUEST_KEY
in the request userInfo dictionary (request.userInfo()
).invokeAction
in class AjaxDynamicElement
request
- the current requestcontext
- context of the transactionpublic NSDictionary createAjaxOptions(com.webobjects.appserver.WOComponent component)
public static void expandInsertionFromOptions(NSMutableDictionary<String,String> options, IAjaxElement element, com.webobjects.appserver.WOComponent component)
public static String expandInsertion(String originalInsertion, String beforeDuration, String afterDuration)
public static NSDictionary removeDefaultOptions(NSDictionary options)
public NSMutableDictionary createObserveFieldOptions(com.webobjects.appserver.WOComponent component)
public void appendToResponse(com.webobjects.appserver.WOResponse response, com.webobjects.appserver.WOContext context)
AjaxDynamicElement
AjaxDynamicElement.addRequiredWebResources(WOResponse, WOContext)
.appendToResponse
in class AjaxDynamicElement
response
- the current responsecontext
- context of the transactionpublic com.webobjects.appserver.WOActionResults handleRequest(com.webobjects.appserver.WORequest request, com.webobjects.appserver.WOContext context)
AjaxDynamicElement
handleRequest
in interface IAjaxElement
handleRequest
in class AjaxDynamicElement
request
- the current requestcontext
- context of the transactionprotected String _containerID(com.webobjects.appserver.WOContext context)
AjaxDynamicElement
_containerID
in class AjaxDynamicElement
context
- context of the transactionnull
public static String updateContainerID(com.webobjects.appserver.WORequest request)
public static void setUpdateContainerID(com.webobjects.appserver.WORequest request, String updateContainerID)
public static boolean hasUpdateContainerID(com.webobjects.appserver.WORequest request)
public static String currentUpdateContainerID()
public static void setCurrentUpdateContainerID(String updateContainerID)
public static String updateContainerID(AjaxDynamicElement element, com.webobjects.appserver.WOComponent component)
public static String updateContainerID(AjaxDynamicElement element, String bindingName, com.webobjects.appserver.WOComponent component)
public static void updateContainerWithID(String updateContainerID, com.webobjects.appserver.WOContext context)
AUC.update('SomeContainerID');
updateContainerID
- the HTML ID of the element implementing the AUCcontext
- WOContext for responsepublic static void safeUpdateContainerWithID(String updateContainerID, com.webobjects.appserver.WOContext context)
if ( $('SomeContainerID') != null ) AUC.update('SomeContainerID');
updateContainerID
- the HTML ID of the element implementing the AUCcontext
- WOContext for responseCopyright © 2002 – 2020 Project Wonder.