5 lines
3.1 KiB
ActionScript
Executable File
5 lines
3.1 KiB
ActionScript
Executable File
/*
|
|
Copyright (c) 2009 Yahoo! Inc. All rights reserved.
|
|
The copyrights embodied in the content of this file are licensed under the BSD (revised) open source license
|
|
*/
|
|
package com.yahoo.astra.events {
|
|
import flash.events.Event;
|
|
|
|
/**
|
|
* Event definitions for <code>FormDataManager</code>.
|
|
*
|
|
* @author kayoh
|
|
*/
|
|
public class FormDataManagerEvent extends Event {
|
|
//--------------------------------------------------------------------------
|
|
//
|
|
// Constants
|
|
//
|
|
//--------------------------------------------------------------------------
|
|
|
|
/**
|
|
* Defines the value of the <code>type</code> property of an <code>passed</code>
|
|
* event object.
|
|
*
|
|
* @eventType validatonPassed
|
|
*/
|
|
public static const VALIDATION_PASSED : String = "validatonPassed";
|
|
/**
|
|
* Defines the value of the <code>type</code> property of an <code>passed</code>
|
|
* event object.
|
|
*
|
|
* @eventType validationFailed
|
|
*/
|
|
public static const VALIDATION_FAILED : String = "validationFailed";
|
|
/**
|
|
* Defines the value of the <code>type</code> property of an <code>passed</code>
|
|
* event object.
|
|
*
|
|
* @eventType dataCollectionSuccess
|
|
*/
|
|
public static const DATACOLLECTION_SUCCESS : String = "dataCollectionSuccess";
|
|
/**
|
|
* Defines the value of the <code>type</code> property of an <code>passed</code>
|
|
* event object.
|
|
*
|
|
* @eventType dataFollectionFail
|
|
*/
|
|
public static const DATACOLLECTION_FAIL : String = "dataFollectionFail";
|
|
|
|
|
|
//--------------------------------------
|
|
// Constructor
|
|
//--------------------------------------
|
|
/**
|
|
* Constructor.
|
|
*
|
|
* @param type The event type; indicates the action that caused the event.
|
|
*
|
|
* @param bubbles Specifies whether the event can bubble up the display list hierarchy.
|
|
*
|
|
* @param cancelable Specifies whether the behavior associated with the event can be prevented.
|
|
*
|
|
* @param errorMsg Reference to the data of error messages from validation
|
|
*
|
|
* @param collectedData Collected data through validation.
|
|
*
|
|
* @see com.yahoo.astra.managers.FormDataManager
|
|
*/
|
|
public function FormDataManagerEvent(type : String, bubbles : Boolean = false, cancelable : Boolean = false, errorMessage : Object = null,collectedData : Object = null) {
|
|
super(type, bubbles, cancelable);
|
|
this.errorMessage = errorMessage;
|
|
this.collectedData = collectedData;
|
|
}
|
|
|
|
//--------------------------------------
|
|
// Properties
|
|
//--------------------------------------
|
|
|
|
/**
|
|
* Collected data from <code>FormDataManager</code>.
|
|
*
|
|
* @see com.yahoo.astra.managers.FormDataManager
|
|
*/
|
|
public var collectedData : Object = null;
|
|
/**
|
|
* Error massages from <code>FormDataManager</code>.
|
|
*
|
|
* @see com.yahoo.astra.managers.FormDataManager
|
|
*/
|
|
public var errorMessage : Object = null;
|
|
|
|
//--------------------------------------
|
|
// Public Methods
|
|
//--------------------------------------
|
|
|
|
/**
|
|
* @private
|
|
*/
|
|
override public function clone() : Event {
|
|
return new FormDataManagerEvent(type, bubbles, cancelable, this.errorMessage, this.collectedData);
|
|
}
|
|
}
|
|
}
|