Project Wonder 5.0.0.8658

er.ajax
Class AjaxResetButton

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

public class AjaxResetButton
extends WOComponent

Simple submit button wrapper around Prototypes Form.reset('formID');. Does a client side reset (to original values or to blank / no selection) of all of a form's inputs.

Author:
Chuck Hill
See Also:
Serialized Form
Bindings
formId String, the id of the form to be reset
           
clear boolean, true if the form values should be cleared, false should be reset to original values
           
value String, optional label for the button, the default is Reset
           
id, String, optional HTML ID for the button element
           
class, String, optional CSS class name for the button element
           
style, String, optional CSS style definition for the button element
           

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
static String CLEAR_BINDING
           
static String FORM_ID_BINDING
           
static String VALUE_BINDING
           
 
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
AjaxResetButton(WOContext context)
           
 
Method Summary
 void appendToResponse(WOResponse response, WOContext context)
          Adds prototype.js to the header.
 boolean clear()
           
 WOComponent dummy()
          This should never be called.
 String formId()
           
 boolean isStateless()
           
 String resetFormJavaScript()
           
 String value()
           
 
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, invokeAction, isCachingEnabled, isEventLoggingEnabled, 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

FORM_ID_BINDING

public static final String FORM_ID_BINDING
See Also:
Constant Field Values

VALUE_BINDING

public static final String VALUE_BINDING
See Also:
Constant Field Values

CLEAR_BINDING

public static final String CLEAR_BINDING
See Also:
Constant Field Values
Constructor Detail

AjaxResetButton

public AjaxResetButton(WOContext context)
Method Detail

isStateless

public boolean isStateless()
Overrides:
isStateless in class WOComponent
Returns:
true

appendToResponse

public void appendToResponse(WOResponse response,
                             WOContext context)
Adds prototype.js to the header.

Overrides:
appendToResponse in class WOComponent

resetFormJavaScript

public String resetFormJavaScript()
Returns:
JavaScript to reset form

formId

public String formId()
Returns:
value of formId binding

value

public String value()
Returns:
value of value binding

clear

public boolean clear()
Returns:
value of value binding

dummy

public WOComponent dummy()
This should never be called. If it gets called, something went wrong with the onClick event on the button.

Returns:
current page

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

Copyright © 2002 – 2007 Project Wonder.