Project Wonder 5.0.0.8658

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:
WOActionResults, NSKeyValueCoding, NSKeyValueCoding.ErrorHandling, NSKeyValueCodingAdditions, NSValidation, IAjaxElement, Serializable, Cloneable
Direct Known Subclasses:
AjaxAccordion, AjaxAutoComplete, AjaxBusyIndicator, AjaxDraggable, AjaxDragResize, AjaxDragResizeContainer, AjaxDroppable, AjaxExpansion, AjaxGMap, AjaxModalDialog, AjaxProxy, AjaxSelectionList, AjaxSlider, AjaxSortableList

public abstract class AjaxComponent
extends 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.
Author:
Jean-Francois Veillette
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class com.webobjects.appserver.WOComponent
WOComponent._EventLoggingEnabler, WOComponent.Event
 
Nested classes/interfaces inherited from interface com.webobjects.foundation.NSKeyValueCodingAdditions
NSKeyValueCodingAdditions.DefaultImplementation, NSKeyValueCodingAdditions.Utility
 
Nested classes/interfaces inherited from interface com.webobjects.foundation.NSValidation
NSValidation._MethodBinding, NSValidation._ValidationBinding, NSValidation.DefaultImplementation, NSValidation.Utility, NSValidation.ValidationException
 
Field Summary
protected  Logger log
          logging
 
Fields inherited from class com.webobjects.appserver.WOComponent
_Extension, _IsEventLoggingEnabled, _keyAssociations, MINUSONE
 
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.NSValidation
_CLASS
 
Constructor Summary
AjaxComponent(WOContext context)
           
 
Method Summary
protected  String _containerID(WOContext context)
           
protected abstract  void addRequiredWebResources(WOResponse res)
          Override this method to append the needed scripts for this component.
protected  void addScriptResourceInHead(WOResponse _response, String _fileName)
           
protected  void addScriptResourceInHead(WOResponse _response, String _framework, String _fileName)
           
protected  void addStylesheetResourceInHead(WOResponse _response, String _fileName)
           
protected  void addStylesheetResourceInHead(WOResponse _response, String _framework, String _fileName)
           
 void appendTagAttributeToResponse(WOResponse response, String name, Object object)
           
 void appendToResponse(WOResponse res, WOContext ctx)
          Overridden to call addRequiredWebResources(WOResponse).
 boolean booleanValueForBinding(String name, boolean defaultValue)
          Utility to get the boolean value of a binding or a default value if none is supplied.
abstract  WOActionResults handleRequest(WORequest request, WOContext context)
          Override this method to return the response for an Ajax request.
 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()).
 String safeElementID()
           
 Object valueForBinding(String name, Object defaultValue)
          Utility to get the value of a binding or a default value if none is supplied.
 Object valueForBinding(String name, Object defaultValue, WOComponent component)
           
 Object valueForBinding(String name, WOComponent component)
           
 
Methods inherited from class com.webobjects.appserver.WOComponent
__valueForBinding, _associationWithName, _awakeInContext, _childTemplate, _cleanUpStatelessComponent, _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, templateWithHTMLString, templateWithName, toString, unableToSetNullForKey, validateTakeValueForKeyPath, validateValueForKey, validationFailedWithException, valueForBinding, valueForBooleanBinding, valueForIntegerBinding, valueForKey, valueForKeyPath, valueForNSArrayBindings, valueForNSDictionaryBindings, valueForNumberBinding, valueForStringBinding
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

log

protected Logger log
logging

Constructor Detail

AjaxComponent

public AjaxComponent(WOContext context)
Method Detail

valueForBinding

public Object valueForBinding(String name,
                              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(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 Object valueForBinding(String name,
                              WOComponent component)
Specified by:
valueForBinding in interface IAjaxElement

valueForBinding

public Object valueForBinding(String name,
                              Object defaultValue,
                              WOComponent component)
Specified by:
valueForBinding in interface IAjaxElement

addScriptResourceInHead

protected void addScriptResourceInHead(WOResponse _response,
                                       String _fileName)

addScriptResourceInHead

protected void addScriptResourceInHead(WOResponse _response,
                                       String _framework,
                                       String _fileName)

addStylesheetResourceInHead

protected void addStylesheetResourceInHead(WOResponse _response,
                                           String _fileName)

addStylesheetResourceInHead

protected void addStylesheetResourceInHead(WOResponse _response,
                                           String _framework,
                                           String _fileName)

invokeAction

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

Overrides:
invokeAction in class WOComponent

_containerID

protected String _containerID(WOContext context)

safeElementID

public String safeElementID()

appendToResponse

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

Overrides:
appendToResponse in class WOComponent

appendTagAttributeToResponse

public void appendTagAttributeToResponse(WOResponse response,
                                         String name,
                                         Object object)

addRequiredWebResources

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

Parameters:
res -

handleRequest

public abstract WOActionResults handleRequest(WORequest request,
                                              WOContext context)
Override this method to return the response for an Ajax request.

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

Last updated: Fri, Nov 21, 2008 • 04:36 AM EST

Copyright © 2002 – 2007 Project Wonder.