Packagelc.core.events
Classpublic class FormEvents
InheritanceFormEvents Inheritance Object

The FormEvents class contains the constants for the event types used to communicate between a Flex application (such as a form created using Flex) and LiveCycle Workspace ES. Unless otherwise indicated, the event class for the event is flash.event.Event.

Communication between the Flex application you create and Workspace ES occurs when events are dispatched to the sharedEvents.EventDispatcher property on the LoaderInfo object of the Flex application you are creating. For example, to emit an event to Workspace ES, your Flex application would do the following:

      systemManager.loaderInfo.sharedEvents.dispatchEvent(new Event(FormEvents.FORM_DATA_INVALID));
  
The FormConnector class can also be used to simplify event handling between a Flex application and Workspace ES.

The following numbered list is the general sequence of events that occurs between the Flex application you create and Workspace ES:

  1. The Flex application you create is loaded by Workspace ES. A setReady event is dispatched after the Flex application application is finished loading.
  2. Workspace ES dispatches a formInitialData event to the Flex application with the initial data. If there is no initial data, the event will be a value of null or an empty space for the data property.
  3. The Flex application must either dispatch events of type formDataValid and formDataInvalid as the data changes from one state to the other or emit a single formDataValid event. Workspace ES may not allow the user to click the Complete button to submit data after a formDataValid event is received. If validation cannot be peformed as the Flex application runs due to performance reasons, a formDataValid event may be emitted in response to the formInitialData event. After a Flex application receives a formSubmitDataRequest event from Workspace ES, the Flex application must validate the data and then dispatch a formSubmitData event or a formSubmitDataInvalid event
  4. The Flex form can dispatch formClean and formDirty events if the Flex application tracks the status of the data. Workspace ES will use the events to determine whether the user should be prompted to save their data.
  5. Workspace ES dispatches a formSaveDataRequest event when the user chooses to save their draft (incomplete) data.
  6. In response to the formSaveDataRequest event, the Flex application must dispatch a formSaveData event with the data as XML.
  7. Workspace ES dispatches a formSubmitDataRequest event when the user chooses to submit their (completed) data.
  8. In response to the formSubmitDataRequest event, the Flex application must dispatch either a formSubmitData event with the valid form data or a formSubmitDataInvalid event, which indicates that validation failed and the data is not in a valid state to be submitted.
  9. After Workspace ES receives a formSubmitData event in response to the formSubmitDataRequest event, it will unload the Flex application.

The following events must be supported by the Flex application for it to function within Workspace ES:

The following events must be sent by the Flex application to Workspace ES:

See also

lc.core.FormConnector


Public Properties
 PropertyDefined By
 Inheritedconstructor : Object
A reference to the class object or constructor function for a given object instance.
Object
 Inheritedprototype : Object
[static] A reference to the prototype object of a class or function object.
Object
Public Methods
 MethodDefined By
 Inherited
Indicates whether an object has a specified property defined.
Object
 Inherited
Indicates whether an instance of the Object class is in the prototype chain of the object specified as the parameter.
Object
 Inherited
Indicates whether the specified property exists and is enumerable.
Object
 Inherited
Sets the availability of a dynamic property for loop operations.
Object
 Inherited
Returns the string representation of the specified object.
Object
 Inherited
Returns the primitive value of the specified object.
Object
Public Constants
 ConstantDefined By
  FORM_CLEAN : String = "formClean"
[static] Dispatches to indicate that the data in the Flex application has not changed since the Flex application was initialized or the data was last saved.
FormEvents
  FORM_DATA_INVALID : String = "formDataInvalid"
[static] Dispatches to indicate that the data is not valid.
FormEvents
  FORM_DATA_VALID : String = "formDataValid"
[static] Dispatches to that the data is valid.
FormEvents
  FORM_DIRTY : String = "formDirty"
[static] Dispatches to indicate that changes have occurred to the data.
FormEvents
  FORM_INITIAL_DATA : String = "formInitialData"
[static] Dispatches initial data to the Flex application.
FormEvents
  FORM_READY : String = "formReady"
[static] Dispatches to indicate that the Flex application is ready to communicate with Workspace ES.
FormEvents
  FORM_SAVE_DATA : String = "formSaveData"
[static] Dispatches to indicate that the data was saved successfully by Workspace ES.
FormEvents
  FORM_SAVE_DATA_REQUEST : String = "formSaveDataRequest"
[static] Dispatches to indicate that the Save Form Data button was clicked within Workspace ES.
FormEvents
  FORM_SUBMIT_DATA : String = "formSubmitData"
[static] Dispatches to indicate that data was successfully submitted by Workspace ES.
FormEvents
  FORM_SUBMIT_DATA_INVALID : String = "formSubmitDataInvalid"
[static] Dispatches to indicate that the data that was submitted is invalid.
FormEvents
  FORM_SUBMIT_DATA_REQUEST : String = "formSubmitDataRequest"
[static] Dispatches to indicate that the Complete button was clicked within Workspace ES.
FormEvents
Constant Detail
FORM_CLEANConstant
public static const FORM_CLEAN:String = "formClean"

Dispatches to indicate that the data in the Flex application has not changed since the Flex application was initialized or the data was last saved. If a Flex application does not dispatch this event, Workspace ES assumes that the formDirty event will not be dispatched and the data is considered always changed. This results in the user always being prompted to save the form regardless of whether changes have been made to the data in the Flex application.

The properties of the event object have the following values:

PropertyValue
bubbles true
cancelable false; there is no default behavior to cancel.
currentTargetThe object that is actively processing the Event object with an event listener.
target The object that dispatched the event; use the currentTarget property to always access the Object listening for the event.

FORM_DATA_INVALIDConstant 
public static const FORM_DATA_INVALID:String = "formDataInvalid"

Dispatches to indicate that the data is not valid.

The properties of the event object have the following values:

PropertyValue
bubbles true
cancelable false; there is no default behavior to cancel.
currentTargetThe object that is actively processing the Event object with an event listener.
target The object that dispatched the event; use the currentTarget property to always access the Object listening for the event.

FORM_DATA_VALIDConstant 
public static const FORM_DATA_VALID:String = "formDataValid"

Dispatches to that the data is valid.

The properties of the event object have the following values:

PropertyValue
bubbles true
cancelable false; there is no default behavior to cancel.
currentTargetThe object that is actively processing the Event object with an event listener.
target The object that dispatched the event; use the currentTarget property to always access the Object listening for the event.

FORM_DIRTYConstant 
public static const FORM_DIRTY:String = "formDirty"

Dispatches to indicate that changes have occurred to the data. Flex application becomes "dirty" when the user has made changes to the data since the Flex application was initialized or the last time form data was sent.

The properties of the event object have the following values:

PropertyValue
bubbles true
cancelable false; there is no default behavior to cancel.
currentTargetThe object that is actively processing the Event object with an event listener.
target The object that dispatched the event; use the currentTarget property to always access the Object listening for the event.

FORM_INITIAL_DATAConstant 
public static const FORM_INITIAL_DATA:String = "formInitialData"

Dispatches initial data to the Flex application.

The properties of the event object have the following values:

PropertyValue
bubbles true
cancelable false; there is no default behavior to cancel.
currentTargetThe object that is actively processing the Event object with an event listener.
target The object that dispatched the event; use the currentTarget property to always access the Object listening for the event.

FORM_READYConstant 
public static const FORM_READY:String = "formReady"

Dispatches to indicate that the Flex application is ready to communicate with Workspace ES.

The properties of the event object have the following values:

PropertyValue
bubbles true
cancelable false; there is no default behavior to cancel.
currentTargetThe object that is actively processing the Event object with an event listener.
target The object that dispatched the event; use the currentTarget property to always access the Object listening for the event.

FORM_SAVE_DATAConstant 
public static const FORM_SAVE_DATA:String = "formSaveData"

Dispatches to indicate that the data was saved successfully by Workspace ES.

The properties of the event object have the following values:

PropertyValue
bubbles true
cancelable false; there is no default behavior to cancel.
currentTargetThe object that is actively processing the Event object with an event listener.
target The object that dispatched the event; use the currentTarget property to always access the Object listening for the event.

FORM_SAVE_DATA_REQUESTConstant 
public static const FORM_SAVE_DATA_REQUEST:String = "formSaveDataRequest"

Dispatches to indicate that the Save Form Data button was clicked within Workspace ES.

The properties of the event object have the following values:

PropertyValue
bubbles true
cancelable false; there is no default behavior to cancel.
currentTargetThe object that is actively processing the Event object with an event listener.
target The object that dispatched the event; use the currentTarget property to always access the Object listening for the event.

FORM_SUBMIT_DATAConstant 
public static const FORM_SUBMIT_DATA:String = "formSubmitData"

Dispatches to indicate that data was successfully submitted by Workspace ES.

The properties of the event object have the following values:

PropertyValue
bubbles true
cancelable false; there is no default behavior to cancel.
currentTargetThe object that is actively processing the Event object with an event listener.
target The object that dispatched the event; use the currentTarget property to always access the Object listening for the event.

FORM_SUBMIT_DATA_INVALIDConstant 
public static const FORM_SUBMIT_DATA_INVALID:String = "formSubmitDataInvalid"

Dispatches to indicate that the data that was submitted is invalid.

The properties of the event object have the following values:

PropertyValue
bubbles true
cancelable false; there is no default behavior to cancel.
currentTargetThe object that is actively processing the Event object with an event listener.
target The object that dispatched the event; use the currentTarget property to always access the Object listening for the event.

FORM_SUBMIT_DATA_REQUESTConstant 
public static const FORM_SUBMIT_DATA_REQUEST:String = "formSubmitDataRequest"

Dispatches to indicate that the Complete button was clicked within Workspace ES.

The properties of the event object have the following values:

PropertyValue
bubbles true
cancelable false; there is no default behavior to cancel.
currentTargetThe object that is actively processing the Event object with an event listener.
target The object that dispatched the event; use the currentTarget property to always access the Object listening for the event.





 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/livecycle/es/sdkHelp/common/langref/lc/core/events/FormEvents.html