Project Wonder 5.0

er.ajax
Class AjaxUpdateLink

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.AjaxUpdateLink
All Implemented Interfaces:
IAjaxElement

public class AjaxUpdateLink
extends AjaxDynamicElement

Updates a region on the screen by creating a request to an action, then returning a script that in turn creates an Ajax.Updater for the area. If you do not provide an action binding, it will just update the specified area.

Bindings
action the action to call when the link executes
           
directActionName the direct action to call when link executes
           
onLoading JavaScript function to evaluate when the request begins
           
onComplete JavaScript function to evaluate when the request has finished.
           
onSuccess JavaScript function to evaluate when the request was successful.
           
onFailure JavaScript function to evaluate when the request has failed.
           
onException JavaScript function to evaluate when the request had errors.
           
evalScripts boolean defining if the container update is expected to be a script.
           
ignoreActionResponse boolean defining if the action's response should be thrown away (useful when the same action has both Ajax and plain links)
           
onClickBefore if the given function returns true, the onClick is executed. This is to support confirm(..) dialogs.
           
onClick JS function, called after the click on the client
           
onClickServer JS returned from the server after the update
           
updateContainerID the id of the AjaxUpdateContainer to update after performing this action
           
replaceID the ID of the div (or other html element) whose contents will be replaced with the results of this action
           
title title of the link
           
style css style of the link
           
class css class of the link
           
id id of the link
           
disabled boolean defining if the link renders the tag
           
string string to get preprended to the contained elements
           
function a custom function to call that takes a single parameter that is the action url
           
elementName the element name to use (defaults to "a")
           
functionName if set, the link becomes a javascript function
           
button if true, this is rendered as a javascript button
           
asynchronous boolean defining if the update request is sent asynchronously or synchronously, defaults to true
           
accesskey hot key that should trigger the link (optional) // PROTOTYPE EFFECTS
           
effect synonym of afterEffect except it always applies to updateContainerID
           
effectDuration the duration of the effect to apply before // PROTOTYPE EFFECTS
           
beforeEffect the Scriptaculous effect to apply onSuccess ("highlight", "slideIn", "blindDown", etc);
           
beforeEffectID the ID of the container to apply the "before" effect to (blank = try nearest container, then try updateContainerID)
           
beforeEffectDuration the duration of the effect to apply before // PROTOTYPE EFFECTS
           
afterEffect the Scriptaculous effect to apply onSuccess ("highlight", "slideIn", "blindDown", etc);
           
afterEffectID the ID of the container to apply the "after" effect to (blank = try nearest container, then try updateContainerID)
           
afterEffectDuration the duration of the effect to apply before // PROTOTYPE EFFECTS
           
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)
           

Field Summary
 
Fields inherited from class er.ajax.AjaxDynamicElement
log
 
Fields inherited from class com.webobjects.appserver.WODynamicElement
_ConstructorParameters
 
Constructor Summary
AjaxUpdateLink(java.lang.String name, com.webobjects.foundation.NSDictionary associations, com.webobjects.appserver.WOElement children)
           
 
Method Summary
static void addEffect(com.webobjects.foundation.NSMutableDictionary options, java.lang.String effect, java.lang.String updateContainerID, java.lang.String duration)
           
protected  void addRequiredWebResources(com.webobjects.appserver.WOResponse res, com.webobjects.appserver.WOContext context)
          Override this method to append the needed scripts for this component.
 void appendToResponse(com.webobjects.appserver.WOResponse response, com.webobjects.appserver.WOContext context)
          Overridden to call AjaxDynamicElement.addRequiredWebResources(WOResponse, WOContext).
protected  com.webobjects.foundation.NSMutableDictionary createAjaxOptions(com.webobjects.appserver.WOComponent component)
           
static java.lang.String fullEffectName(java.lang.String effectName)
           
 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.
 java.lang.String onClick(com.webobjects.appserver.WOContext context, boolean generateFunctionWrapper)
           
 
Methods inherited from class er.ajax.AjaxDynamicElement
_containerID, addScriptResourceInHead, addScriptResourceInHead, addStylesheetResourceInHead, addStylesheetResourceInHead, appendTagAttributeToResponse, associations, bindingNamed, booleanValueForBinding, hasBinding, invokeAction, setValueForBinding, shouldHandleRequest, stringValueForBinding, takeValuesFromRequest, 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

AjaxUpdateLink

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

onClick

public java.lang.String onClick(com.webobjects.appserver.WOContext context,
                                boolean generateFunctionWrapper)

addEffect

public static void addEffect(com.webobjects.foundation.NSMutableDictionary options,
                             java.lang.String effect,
                             java.lang.String updateContainerID,
                             java.lang.String duration)

fullEffectName

public static java.lang.String fullEffectName(java.lang.String effectName)

createAjaxOptions

protected com.webobjects.foundation.NSMutableDictionary createAjaxOptions(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

addRequiredWebResources

protected void addRequiredWebResources(com.webobjects.appserver.WOResponse res,
                                       com.webobjects.appserver.WOContext context)
Description copied from class: AjaxDynamicElement
Override this method to append the needed scripts for this component.

Specified by:
addRequiredWebResources 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

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

Copyright © 2002 – 2007 Project Wonder.