This component allows validating user input against Hibernate Validator annotations on the server.
It uses Hessian protocol.
destination:String [read-write]Implementation
public function get destination():String
public function set destination(value:String):void
protected var responseString:String
String returned from the server
validationTarget:String [read-write]Implementation
public function get validationTarget():String
public function set validationTarget(value:String):void
validatorComponent:String [read-write]Implementation
public function get validatorComponent():String
public function set validatorComponent(value:String):void
public function HessianEntityValidator()
Constructor
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
public function fault(info:Object):void
Fault event handler. Executes on operation
execution fault
Parameters
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
|
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