Packagecom.exadel.flamingo.flex.components.flamingo
Classpublic class HessianEntityValidator
InheritanceHessianEntityValidator Inheritance mx.validators.Validator
Implementsmx.rpc.IResponder

This component allows validating user input against Hibernate Validator annotations on the server. It uses Hessian protocol.



Public Properties
 PropertyDefined by
  destination : String
HessianEntityValidator
  validationTarget : String
HessianEntityValidator
  validatorComponent : String
HessianEntityValidator
Protected Properties
 PropertyDefined by
  responseString : String
String returned from the server
HessianEntityValidator
Public Methods
 MethodDefined by
  
Constructor
HessianEntityValidator
  
fault(info:Object):void
Fault event handler.
HessianEntityValidator
  
result(data:Object):void
Result event handler.
HessianEntityValidator
  
validate(value:Object = null, suppressEvents:Boolean = false):ValidationResultEvent
Performs validation and optionally notifies the listeners of the result.
HessianEntityValidator
Protected Methods
 MethodDefined by
  
doValidation(value:Object):Array
Executes the validation logic of this validator, including validating that a missing or empty value causes a validation error as defined by the value of the required property.
HessianEntityValidator
Property detail
destinationproperty
destination:String  [read-write]Implementation
    public function get destination():String
    public function set destination(value:String):void
responseStringproperty 
protected var responseString:String

String returned from the server

validationTargetproperty 
validationTarget:String  [read-write]Implementation
    public function get validationTarget():String
    public function set validationTarget(value:String):void
validatorComponentproperty 
validatorComponent:String  [read-write]Implementation
    public function get validatorComponent():String
    public function set validatorComponent(value:String):void
Constructor detail
HessianEntityValidator()constructor
public function HessianEntityValidator()

Constructor

Method detail
doValidation()method
protected override function doValidation(value:Object):Array

Executes the validation logic of this validator, including validating that a missing or empty value causes a validation error as defined by the value of the required property. Returns an validation error in case when value received from server is not empty

Parameters
value:Object — Value to validate.

Returns
Array — For an invalid result, an Array of ValidationResult objects, with one ValidationResult object for each field examined by the validator that failed validation.

See also

mx.validators.ValidationResult
fault()method 
public function fault(info:Object):void

Fault event handler. Executes on operation execution fault

Parameters
info:Object — fault info
result()method 
public function result(data:Object):void

Result event handler. Executes on operation responce received from the server

Parameters
data:Object — value returned from the server
validate()method 
public override function validate(value:Object = null, suppressEvents:Boolean = false):ValidationResultEvent

Performs validation and optionally notifies the listeners of the result. Triggers call to server side validator (without actual validation) when first called. Starts validation on server responce received.

Parameters
value:Object (default = null) — Optional value to validate. If null, then the validator uses the source and property properties to determine the value. If you specify this argument, you should also set the listener property to specify the target component for any validation error messages.
 
suppressEvents:Boolean (default = false) — If false, then after validation, the validator will notify the listener of the result.

Returns
ValidationResultEvent — A ValidationResultEvent object containing the results of the validation. For a successful validation, the ValidationResultEvent.results Array property is empty. For a validation failure, the ValidationResultEvent.results Array property contains one ValidationResult object for each field checked by the validator, both for fields that failed the validation and for fields that passed. Examine the ValidationResult.isError property to determine if the field passed or failed the validation.

See also

mx.events.ValidationResultEvent
mx.validators.ValidationResult