Project Wonder 5.0

er.ajax
Class AjaxInPlace

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

public class AjaxInPlace
extends com.webobjects.appserver.WOComponent

AjaxInPlace is a generalization of the AjaxInPlaceEditor. To use this component, you must wrap an ERXWOTemplate named "view" and an ERXWOTemplate named "edit".
For instance:

HTML:

   <webobject name = "ExampleInPlace">
      <webobject name = "View">View: <webobject name = "Value"/></webobject>
      <webobject name = "Edit">Edit: <webobject name = "ValueField"/></webobject>
   </webobject>
 
WOD:
   ExampleInPlace : AjaxInPlace {
   }
   
   View : ERXWOTemplate {
      templateName = "view";
   }
   
   Value : WOString {
      value = value;
   }
   
   Edit : ERXWOTemplate {
      templateName = "edit";
   }
   
   ValueField : WOTextField {
      value = value;
   }
 

See Also:
Serialized Form
Author:
mschrag
Bindings
class the class used on the top container
           
id the id used on various parts of this component
           
saveLabel the label to show on the save button
           
saveAction the action to invoke on save
           
saveUpdateContainerID by default save updates the container specified in "id", but you can override that with this binding
           
saveClass the class of the save button
           
canSave if true, the results are saved; if false, the user is not allowed to leave edit mode
           
onSaveClick the action to fire when save is clicked
           
onSaveSuccess the javascript function to execute after a successful save
           
onSaveFailure the javascript function to execute after a failed save
           
onSaving the javascript action to fire when saving
           
button if true, the save action is a button; if false, it's a link
           
submitOnSave if true, the save button is an AjaxSubmitButton; if false, it's an AjaxUpdateLink (which will not actually submit a form -- you would have to do some work here) // PROTOTYPE FUNCTIONS
           
saveInsertion the insertion function to use on save
           
saveInsertionDuration the duration of the before and after insertion animation (if using insertion)
           
saveBeforeInsertionDuration the duration of the before insertion animation (if using insertion)
           
saveAfterInsertionDuration the duration of the after insertion animation (if using insertion)
           
cancelLabel the label to show on the cancel button
           
cancelAction the action to invoke on cancel
           
cancelUpdateContainerID by default cancel updates the container specified in "id", but you can override that with this binding
           
cancelClass the class of the cancel button
           
onCancelClick the action to fire when cancel is clicked
           
onCancelSuccess the javascript function to execute after a successful cancel
           
onCancelFailure the javascript function to execute after a failed cancel
           
onCancelling the javascript action to fire when cancelling // PROTOTYPE FUNCTIONS
           
cancelInsertion the insertion function to use on cancel
           
cancelInsertionDuration the duration of the before and after insertion animation (if using insertion)
           
cancelBeforeInsertionDuration the duration of the before insertion animation (if using insertion)
           
cancelAfterInsertionDuration the duration of the after insertion animation (if using insertion)
           
editClass the class of the div that you click on to trigger edit mode (yes this name sucks)
           
canEdit if true, edit mode is entered; if false, view mode remains active
           
editOnly if true, edit mode is locked on (and save controls don't show if it's in a parent form); if false, you can switch between edit and view mode
           
onEditClick the action to fire when edit mode is triggered
           
onEditSuccess the javascript function to execute after a successful edit
           
onEditFailure the javascript function to execute after a failed edit
           
onEditing the javascript action to fire when editing mode is loading // PROTOTYPE FUNCTIONS
           
editInsertion the insertion function to use on edit
           
editInsertionDuration the duration of the before and after insertion animation (if using insertion)
           
editBeforeInsertionDuration the duration of the before insertion animation (if using insertion)
           
editAfterInsertionDuration the duration of the after insertion animation (if using insertion)
           
onRefreshComplete the javascript function to execute after refreshing the container
           
disabled whether or not edit mode should be disabled
           
manualControl if true, it is up to you to provide click-to-edit, save, and cancel controls
           
manualViewControl if true, it is up to you to provide click-to-edit controls
           
manualEditControl if true, it is up to you to provide save and cancel controls
           
style the style of the top level container
           
elementName the name of the container element (defaults to "div")
           
formSerializer the name of the javascript function to call to serialize the form
           
onsubmit pass through onsubmit to form
           

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
static org.apache.log4j.Logger log
           
 
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
AjaxInPlace(com.webobjects.appserver.WOContext context)
           
 
Method Summary
 void appendToResponse(com.webobjects.appserver.WOResponse aResponse, com.webobjects.appserver.WOContext aContext)
           
 boolean button()
           
 com.webobjects.appserver.WOActionResults cancel()
           
 java.lang.String cancelFunctionCall()
           
 java.lang.String cancelFunctionName()
           
 java.lang.String cancelUpdateContainerID()
           
 boolean canEdit()
           
 boolean canSave()
           
 boolean changingToEdit()
           
 boolean changingToView()
           
 java.lang.String cleanupFunction()
           
 boolean disabled()
           
 boolean disableForm()
           
 java.lang.String editFunctionCall()
           
 java.lang.String editFunctionName()
           
 boolean editing()
           
 boolean editOnly()
           
 java.lang.String elementName()
           
 java.lang.String formName()
           
 java.lang.String id()
           
 com.webobjects.appserver.WOActionResults invokeAction(com.webobjects.appserver.WORequest aRequest, com.webobjects.appserver.WOContext aContext)
           
 boolean linkOnSave()
           
 boolean manualControl()
           
 boolean manualEditControl()
           
 boolean manualViewControl()
           
 com.webobjects.appserver.WOActionResults save()
           
 java.lang.String saveFunctionCall()
           
 java.lang.String saveFunctionName()
           
 java.lang.String saveLabel()
           
 java.lang.String saveUpdateContainerID()
           
 void setEditing(boolean editing)
           
 com.webobjects.appserver.WOActionResults startEditing()
           
 boolean submitOnSave()
           
 boolean synchronizesVariablesWithBindings()
           
 void takeValuesFromRequest(com.webobjects.appserver.WORequest aRequest, com.webobjects.appserver.WOContext aContext)
           
 java.lang.String updateFunctionName()
           
 
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, takeValueForKey, takeValueForKeyPath, 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
 

Field Detail

log

public static final org.apache.log4j.Logger log
Constructor Detail

AjaxInPlace

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

synchronizesVariablesWithBindings

public boolean synchronizesVariablesWithBindings()
Overrides:
synchronizesVariablesWithBindings in class com.webobjects.appserver.WOComponent

elementName

public java.lang.String elementName()

id

public java.lang.String id()

invokeAction

public com.webobjects.appserver.WOActionResults invokeAction(com.webobjects.appserver.WORequest aRequest,
                                                             com.webobjects.appserver.WOContext aContext)
Overrides:
invokeAction in class com.webobjects.appserver.WOComponent

takeValuesFromRequest

public void takeValuesFromRequest(com.webobjects.appserver.WORequest aRequest,
                                  com.webobjects.appserver.WOContext aContext)
Overrides:
takeValuesFromRequest in class com.webobjects.appserver.WOComponent

appendToResponse

public void appendToResponse(com.webobjects.appserver.WOResponse aResponse,
                             com.webobjects.appserver.WOContext aContext)
Overrides:
appendToResponse in class com.webobjects.appserver.WOComponent

saveUpdateContainerID

public java.lang.String saveUpdateContainerID()

cancelUpdateContainerID

public java.lang.String cancelUpdateContainerID()

saveLabel

public java.lang.String saveLabel()

formName

public java.lang.String formName()

button

public boolean button()

submitOnSave

public boolean submitOnSave()

linkOnSave

public boolean linkOnSave()

disableForm

public boolean disableForm()

updateFunctionName

public java.lang.String updateFunctionName()

editFunctionName

public java.lang.String editFunctionName()

editFunctionCall

public java.lang.String editFunctionCall()

saveFunctionName

public java.lang.String saveFunctionName()

saveFunctionCall

public java.lang.String saveFunctionCall()

cancelFunctionName

public java.lang.String cancelFunctionName()

cancelFunctionCall

public java.lang.String cancelFunctionCall()

manualControl

public boolean manualControl()

manualEditControl

public boolean manualEditControl()

manualViewControl

public boolean manualViewControl()

disabled

public boolean disabled()

editOnly

public boolean editOnly()

editing

public boolean editing()

canEdit

public boolean canEdit()

canSave

public boolean canSave()

changingToEdit

public boolean changingToEdit()

changingToView

public boolean changingToView()

setEditing

public void setEditing(boolean editing)

cleanupFunction

public java.lang.String cleanupFunction()

startEditing

public com.webobjects.appserver.WOActionResults startEditing()

save

public com.webobjects.appserver.WOActionResults save()

cancel

public com.webobjects.appserver.WOActionResults cancel()

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

Copyright © 2002 – 2007 Project Wonder.