Project Wonder 5.0

er.ajax
Class AjaxComponent

java.lang.Object
  extended by com.webobjects.appserver.WOElement
      extended by com.webobjects.appserver.WOComponent
          extended by er.ajax.AjaxComponent
All Implemented Interfaces:
com.webobjects.appserver.WOActionResults, com.webobjects.foundation.NSKeyValueCoding, com.webobjects.foundation.NSKeyValueCoding.ErrorHandling, com.webobjects.foundation.NSKeyValueCodingAdditions, com.webobjects.foundation.NSValidation, IAjaxElement, java.io.Serializable, java.lang.Cloneable
Direct Known Subclasses:
AjaxAccordion, AjaxAutoComplete, AjaxBusyIndicator, AjaxDatePicker, AjaxDraggable, AjaxDragResize, AjaxDragResizeContainer, AjaxDroppable, AjaxExpansion, AjaxGMap, AjaxModalDialog, AjaxModalDialogOpener, AjaxProxy, AjaxSelectionList, AjaxSlider, AjaxSortableList

public abstract class AjaxComponent
extends com.webobjects.appserver.WOComponent
implements IAjaxElement

This abstract (by design) superclass component isolate general utility methods.

Version:
$Revision $, $Date $
© 2006 OS communications informatiques, inc. http://www.os.ca Tous droits réservés.
See Also:
Serialized Form
Author:
Jean-Francois Veillette

Nested Class Summary
 
Nested classes/interfaces inherited from class com.webobjects.appserver.WOComponent
com.webobjects.appserver.WOComponent._EventLoggingEnabler, com.webobjects.appserver.WOComponent.Event
 
Nested classes/interfaces inherited from interface com.webobjects.foundation.NSKeyValueCodingAdditions
com.webobjects.foundation.NSKeyValueCodingAdditions.DefaultImplementation, com.webobjects.foundation.NSKeyValueCodingAdditions.Utility
 
Nested classes/interfaces inherited from interface com.webobjects.foundation.NSKeyValueCoding
com.webobjects.foundation.NSKeyValueCoding._BooleanFieldBinding, com.webobjects.foundation.NSKeyValueCoding._BooleanMethodBinding, com.webobjects.foundation.NSKeyValueCoding._FieldBinding, com.webobjects.foundation.NSKeyValueCoding._ForwardingBinding, com.webobjects.foundation.NSKeyValueCoding._KeyBinding, com.webobjects.foundation.NSKeyValueCoding._KeyBindingCreation, com.webobjects.foundation.NSKeyValueCoding._MethodBinding, com.webobjects.foundation.NSKeyValueCoding._NumberFieldBinding, com.webobjects.foundation.NSKeyValueCoding._NumberMethodBinding, com.webobjects.foundation.NSKeyValueCoding._ReflectionKeyBindingCreation, com.webobjects.foundation.NSKeyValueCoding.ErrorHandling, com.webobjects.foundation.NSKeyValueCoding.Null, com.webobjects.foundation.NSKeyValueCoding.UnknownKeyException, com.webobjects.foundation.NSKeyValueCoding.ValueAccessor
 
Nested classes/interfaces inherited from interface com.webobjects.foundation.NSValidation
com.webobjects.foundation.NSValidation._MethodBinding, com.webobjects.foundation.NSValidation._ValidationBinding, com.webobjects.foundation.NSValidation.DefaultImplementation, com.webobjects.foundation.NSValidation.Utility, com.webobjects.foundation.NSValidation.ValidationException
 
Field Summary
 
Fields inherited from class com.webobjects.appserver.WOComponent
_Extension, _IsEventLoggingEnabled, _keyAssociations
 
Fields inherited from interface com.webobjects.foundation.NSKeyValueCoding.ErrorHandling
_CLASS
 
Fields inherited from interface com.webobjects.foundation.NSKeyValueCodingAdditions
_CLASS, _KeyPathSeparatorChar, KeyPathSeparator
 
Fields inherited from interface com.webobjects.foundation.NSKeyValueCoding
NullValue
 
Fields inherited from interface com.webobjects.foundation.NSValidation
_CLASS
 
Constructor Summary
AjaxComponent(com.webobjects.appserver.WOContext context)
           
 
Method Summary
protected  java.lang.String _containerID(com.webobjects.appserver.WOContext context)
          Returns the ID that represents this container for the purposes of Ajax updates.
protected abstract  void addRequiredWebResources(com.webobjects.appserver.WOResponse res)
          Override this method to append the needed scripts for this component.
protected  void addScriptResourceInHead(com.webobjects.appserver.WOResponse _response, java.lang.String _fileName)
           
protected  void addScriptResourceInHead(com.webobjects.appserver.WOResponse _response, java.lang.String _framework, java.lang.String _fileName)
           
protected  void addStylesheetResourceInHead(com.webobjects.appserver.WOResponse _response, java.lang.String _fileName)
           
protected  void addStylesheetResourceInHead(com.webobjects.appserver.WOResponse _response, java.lang.String _framework, java.lang.String _fileName)
           
 void appendTagAttributeToResponse(com.webobjects.appserver.WOResponse response, java.lang.String name, java.lang.Object object)
           
 void appendToResponse(com.webobjects.appserver.WOResponse res, com.webobjects.appserver.WOContext ctx)
          Overridden to call addRequiredWebResources(WOResponse).
 boolean booleanValueForBinding(java.lang.String name, boolean defaultValue)
          Utility to get the boolean value of a binding or a default value if none is supplied.
abstract  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.
 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()).
 java.lang.String safeElementID()
           
protected  boolean shouldHandleRequest(com.webobjects.appserver.WORequest request, com.webobjects.appserver.WOContext context)
           
 java.lang.Object valueForBinding(java.lang.String name, java.lang.Object defaultValue)
          Utility to get the value of a binding or a default value if none is supplied.
 java.lang.Object valueForBinding(java.lang.String name, java.lang.Object defaultValue, com.webobjects.appserver.WOComponent component)
           
 java.lang.Object valueForBinding(java.lang.String name, com.webobjects.appserver.WOComponent component)
           
 
Methods inherited from class com.webobjects.appserver.WOComponent
_associationWithName, _awakeInContext, _childTemplate, _componentDefinition, _componentUnroll, _isPage, _setContext, _setIsPage, _setParent, _setSubcomponent, _sleepInContext, _subcomponentForElementWithID, _templateNameForClass, _unroll, application, awake, baseURL, bindingKeys, canAccessFieldsDirectly, canGetValueForBinding, canSetValueForBinding, clone, context, debugString, descriptionForResponse, ensureAwakeInContext, frameworkName, generateResponse, handleQueryWithUnboundKey, handleTakeValueForUnboundKey, hasBinding, hasSession, isCachingEnabled, isEventLoggingEnabled, isStateless, logString, name, pageWithName, parent, path, pathURL, performParentAction, pullValuesFromParent, pushValuesToParent, reset, session, set_componentUnroll, set_unroll, setCachingEnabled, setValueForBinding, sleep, synchronizesVariablesWithBindings, takeValueForKey, takeValueForKeyPath, takeValuesFromRequest, template, templateWithHTMLString, templateWithName, toString, unableToSetNullForKey, validateTakeValueForKeyPath, validateValueForKey, validationFailedWithException, valueForBinding, valueForKey, valueForKeyPath
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AjaxComponent

public AjaxComponent(com.webobjects.appserver.WOContext context)
Method Detail

valueForBinding

public java.lang.Object valueForBinding(java.lang.String name,
                                        java.lang.Object defaultValue)
Utility to get the value of a binding or a default value if none is supplied.

Parameters:
name - name of the binding
defaultValue - value to return if unbound
Returns:
value for binding or defaultValue value if unbound

booleanValueForBinding

public boolean booleanValueForBinding(java.lang.String name,
                                      boolean defaultValue)
Utility to get the boolean value of a binding or a default value if none is supplied. Handles non-boolean bindings Numbers, NSArray, String, NSKeyValueCoding.

Parameters:
name - name of the binding
defaultValue - value to return if unbound
Returns:
value for binding or defaultValue value if unbound

valueForBinding

public java.lang.Object valueForBinding(java.lang.String name,
                                        com.webobjects.appserver.WOComponent component)
Specified by:
valueForBinding in interface IAjaxElement

valueForBinding

public java.lang.Object valueForBinding(java.lang.String name,
                                        java.lang.Object defaultValue,
                                        com.webobjects.appserver.WOComponent component)
Specified by:
valueForBinding in interface IAjaxElement

addScriptResourceInHead

protected void addScriptResourceInHead(com.webobjects.appserver.WOResponse _response,
                                       java.lang.String _fileName)

addScriptResourceInHead

protected void addScriptResourceInHead(com.webobjects.appserver.WOResponse _response,
                                       java.lang.String _framework,
                                       java.lang.String _fileName)

addStylesheetResourceInHead

protected void addStylesheetResourceInHead(com.webobjects.appserver.WOResponse _response,
                                           java.lang.String _fileName)

addStylesheetResourceInHead

protected void addStylesheetResourceInHead(com.webobjects.appserver.WOResponse _response,
                                           java.lang.String _framework,
                                           java.lang.String _fileName)

invokeAction

public 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()).

Overrides:
invokeAction in class com.webobjects.appserver.WOComponent

_containerID

protected java.lang.String _containerID(com.webobjects.appserver.WOContext context)
Returns the ID that represents this container for the purposes of Ajax updates. In common cases, this corresponds to your updateContainerID.

Parameters:
context - the current context
Returns:
your container ID

shouldHandleRequest

protected boolean shouldHandleRequest(com.webobjects.appserver.WORequest request,
                                      com.webobjects.appserver.WOContext context)

safeElementID

public java.lang.String safeElementID()

appendToResponse

public void appendToResponse(com.webobjects.appserver.WOResponse res,
                             com.webobjects.appserver.WOContext ctx)
Overridden to call addRequiredWebResources(WOResponse).

Overrides:
appendToResponse in class com.webobjects.appserver.WOComponent

appendTagAttributeToResponse

public void appendTagAttributeToResponse(com.webobjects.appserver.WOResponse response,
                                         java.lang.String name,
                                         java.lang.Object object)

addRequiredWebResources

protected abstract void addRequiredWebResources(com.webobjects.appserver.WOResponse res)
Override this method to append the needed scripts for this component.

Parameters:
res -

handleRequest

public abstract 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.

Specified by:
handleRequest in interface IAjaxElement
Parameters:
request -
context -

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

Copyright © 2002 – 2007 Project Wonder.