Project Wonder 5.0.0.8660

er.ajax
Class AjaxPing

java.lang.Object
  extended by com.webobjects.appserver.WOElement
      extended by com.webobjects.appserver.WOComponent
          extended by er.ajax.AjaxPing
All Implemented Interfaces:
WOActionResults, NSKeyValueCoding, NSKeyValueCoding.ErrorHandling, NSKeyValueCodingAdditions, NSValidation, Serializable, Cloneable

public class AjaxPing
extends WOComponent

AjaxPing provides support for refreshing a large content area based on a series of periodic refreshes of a very small area. You provide a cache key that upon changing, triggers the update of another target AjaxUpdateContainer.

For instance, if you have a list of blog entries, you might refresh the blog entries container with a cache key "blogEntries.count". When the count of the blog entries changes, the entire container will be refreshed.

Author:
mschrag
See Also:
Serialized Form
Bindings
frequency the frequency of refresh (in millis), defaults to 3000
           
targetContainerID the ID of the update container to refresh when a change is detected
           
cacheKey some hash value that represents the state of the target container
           
onBeforeUpdate (optional) the javascript function to call before updating (should return true if the update should happen, false if not)
           
id (optional) the id of the ping update container (set this if you want to attach an AjaxBusyIndicator)
           
stop (optional) if true, the ping will stop. If false, the ping will run. It's up to you to refresh the ping's container to get it running again after the binding changes from false to true.
           

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
 
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
AjaxPing(WOContext context)
           
 
Method Summary
 Object frequency()
          Returns the frequency of refresh in millis.
 String id()
          Returns the ID of the ping container.
 boolean synchronizesVariablesWithBindings()
           
 
Methods inherited from class com.webobjects.appserver.WOComponent
__valueForBinding, _associationWithName, _awakeInContext, _childTemplate, _cleanUpStatelessComponent, _componentDefinition, _componentUnroll, _isPage, _setContext, _setIsPage, _setParent, _setSubcomponent, _sleepInContext, _subcomponentForElementWithID, _templateNameForClass, _unroll, appendToResponse, application, awake, baseURL, bindingKeys, canAccessFieldsDirectly, canGetValueForBinding, canSetValueForBinding, clone, context, debugString, descriptionForResponse, ensureAwakeInContext, frameworkName, generateResponse, handleQueryWithUnboundKey, handleTakeValueForUnboundKey, hasBinding, hasSession, invokeAction, isCachingEnabled, isEventLoggingEnabled, isStateless, logString, name, pageWithName, parent, path, pathURL, performParentAction, pullValuesFromParent, pushValuesToParent, reset, session, set_componentUnroll, set_unroll, setCachingEnabled, setValueForBinding, sleep, 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
 

Constructor Detail

AjaxPing

public AjaxPing(WOContext context)
Method Detail

synchronizesVariablesWithBindings

public boolean synchronizesVariablesWithBindings()
Overrides:
synchronizesVariablesWithBindings in class WOComponent

frequency

public Object frequency()
Returns the frequency of refresh in millis.

Returns:
the frequency of refresh in millis

id

public String id()
Returns the ID of the ping container.

Returns:
the ID of the ping container

Last updated: Sat, Nov 22, 2008 • 04:41 AM EST

Copyright © 2002 – 2007 Project Wonder.