AjaxInPlace Class Reference

Inherits com::webobjects::appserver::WOComponent.

Collaboration diagram for AjaxInPlace:

Collaboration graph
base refererrect $struct___string.html 21,13 85,37
[legend]

List of all members.

Public Member Functions

 AjaxInPlace (WOContext context)
void appendToResponse (WOResponse aResponse, WOContext aContext)
boolean button ()
WOActionResults cancel ()
String cancelFunctionCall ()
String cancelFunctionName ()
String cancelUpdateContainerID ()
boolean canEdit ()
boolean canSave ()
boolean changingToEdit ()
boolean changingToView ()
String cleanupFunction ()
boolean disabled ()
boolean disableForm ()
String editFunctionCall ()
String editFunctionName ()
boolean editing ()
boolean editOnly ()
String elementName ()
String formName ()
String id ()
WOActionResults invokeAction (WORequest aRequest, WOContext aContext)
boolean linkOnSave ()
boolean manualControl ()
boolean manualEditControl ()
boolean manualViewControl ()
WOActionResults save ()
String saveFunctionCall ()
String saveFunctionName ()
String saveLabel ()
String saveUpdateContainerID ()
void setEditing (boolean editing)
WOActionResults startEditing ()
boolean submitOnSave ()
boolean synchronizesVariablesWithBindings ()
void takeValuesFromRequest (WORequest aRequest, WOContext aContext)
String updateFunctionName ()

Static Public Attributes

static final Logger log = Logger.getLogger(AjaxInPlace.class)

Private Attributes

boolean _alreadyInForm
boolean _changingToEdit
boolean _changingToView
boolean _editing
String _id


Detailed Description

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;
   }
 

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

Author:
mschrag

Constructor & Destructor Documentation

AjaxInPlace ( WOContext  context  ) 


Member Function Documentation

void appendToResponse ( WOResponse  aResponse,
WOContext  aContext 
)

boolean button (  ) 

WOActionResults cancel (  ) 

String cancelFunctionCall (  ) 

String cancelFunctionName (  ) 

String cancelUpdateContainerID (  ) 

boolean canEdit (  ) 

boolean canSave (  ) 

boolean changingToEdit (  ) 

boolean changingToView (  ) 

String cleanupFunction (  ) 

boolean disabled (  ) 

boolean disableForm (  ) 

String editFunctionCall (  ) 

String editFunctionName (  ) 

boolean editing (  ) 

boolean editOnly (  ) 

String elementName (  ) 

String formName (  ) 

String id (  ) 

WOActionResults invokeAction ( WORequest  aRequest,
WOContext  aContext 
)

boolean linkOnSave (  ) 

boolean manualControl (  ) 

boolean manualEditControl (  ) 

boolean manualViewControl (  ) 

WOActionResults save (  ) 

String saveFunctionCall (  ) 

String saveFunctionName (  ) 

String saveLabel (  ) 

String saveUpdateContainerID (  ) 

void setEditing ( boolean  editing  ) 

WOActionResults startEditing (  ) 

boolean submitOnSave (  ) 

boolean synchronizesVariablesWithBindings (  ) 

void takeValuesFromRequest ( WORequest  aRequest,
WOContext  aContext 
)

String updateFunctionName (  ) 


Member Data Documentation

boolean _alreadyInForm [private]

boolean _changingToEdit [private]

boolean _changingToView [private]

boolean _editing [private]

String _id [private]

final Logger log = Logger.getLogger(AjaxInPlace.class) [static]


The documentation for this class was generated from the following file:

Generated on Sat May 26 06:42:38 2012 for Project Wonder by  doxygen 1.5.8