Packageat.validators
Classpublic class NavigationChangeValidator
InheritanceNavigationChangeValidator Inheritance flash.events.EventDispatcher



Public Properties
 PropertyDefined by
  debugMode : Boolean = false
[static] Outputs useful information for debugging this component for developers when true.
NavigationChangeValidator
  debugValidation : Boolean = false
[static] If true, trace statements reveal internal validation messages
NavigationChangeValidator
Public Methods
 MethodDefined by
  
Constructor
NavigationChangeValidator
  
[static] Clears out the currentSlideHistory of the NavigationChangeValidator.
NavigationChangeValidator
  
doesSlideHaveRules(value:XML):SlideRulesResult
[static] This is an internal NavigationChangeValidator helper function to determine if the supplied slide contains any rule restrictions.
NavigationChangeValidator
  
ValidateChange(currentSlide:XML, newSlide:XML, allowBackward:Boolean = false):ValidationResult
[static] Validates movement from one content slide to another based on the following business rules: (mustPrecede, mustFollow, mustNotPrecede, mustNotFollow).
NavigationChangeValidator
Property detail
debugModeproperty
public static var debugMode:Boolean = false

Outputs useful information for debugging this component for developers when true.

The output is typically in the form of trace statements and Alerts.

The default value is false.

debugValidationproperty 
public static var debugValidation:Boolean = false

If true, trace statements reveal internal validation messages

Constructor detail
NavigationChangeValidator()constructor
public function NavigationChangeValidator()

Constructor

Method detail
clearCurrentSlideHistory()method
public static function clearCurrentSlideHistory():void

Clears out the currentSlideHistory of the NavigationChangeValidator. This is automatically called everytime a call is changed. There is no need to call this method manually;

doesSlideHaveRules()method 
public static function doesSlideHaveRules(value:XML):SlideRulesResult

This is an internal NavigationChangeValidator helper function to determine if the supplied slide contains any rule restrictions.

Parameters
value:XML — The slide XML that you would like to test against

Returns
SlideRulesResult

See also

at.validators.results.SlideRulesResult
ValidateChange()method 
public static function ValidateChange(currentSlide:XML, newSlide:XML, allowBackward:Boolean = false):ValidationResult

Validates movement from one content slide to another based on the following business rules: (mustPrecede, mustFollow, mustNotPrecede, mustNotFollow). Where each contains a list of slides that may or may not precede/follow the current one. This method validates navigation in the PresentationModule, and is helpful if indicating a navigation move will be valid before trying to actually navigate.

Parameters
currentSlide:XML — an XML node containing the following attributes dbid, title. Additionally the following attributes provide business containts that can be validated against the newSlide XML parameter (mustPrecede, mustFollow, mustNotPrecede, mustNotFollow) each with a list of dbid's of other slides.
 
newSlide:XML — an XML node containing the following attributes dbid, title. Additionally the following attributes provide business containts that can be validated against the currentSlide XML parameter (mustPrecede, mustFollow, mustNotPrecede, mustNotFollow) each with a list of dbid's of other slides.
 
allowBackward:Boolean (default = false) — if true, checks in the history manager to see if the slide has been visited before, and if so, does not consider the currentSlide's mustFollow constraint or the newSlide's mustPrecede containt. If false, validates against all constraints.

Returns
ValidationResultValidationResult indicating whether there would be an error in the requested navigation. If there is no error, the isError property of the ValidationResult will be set to false, if an error exists and therefore is invalid, the isError property will be set to true.