Caplin Trader 4.0.3

Interface: module:br/presenter/property/PropertyListener

module:br/presenter/property/PropertyListener

Summary

Interface implemented by classes that wish to listen to property change events.

Methods

onPropertyChanged()

Callback method invoked when the value of a module:br/presenter/property/Property changes.

Implementation of this method is optional, and no action will be taken if the method is invoked but has not been overridden.

Implementations:
  • module:br/presenter/control/selectionfield/ToggleSwitchControl#onPropertyChanged
  • module:br/presenter/validator/CrossValidationPropertyListener#onPropertyChanged

onPropertyUpdated()

Callback method invoked when the value of a module:br/presenter/property/Property is updated, even when it hasn't changed.

This event is there to accommodate cases where we want to know about calls to set the value of a property even if the new value being set is the same as the old one.

Implementation of this method is optional, and no action will be taken if the method is invoked but has not been overridden.

onValidationComplete()

Callback method invoked once validation is complete.

Implementation of this method is optional, and no action will be taken if the method is invoked but has not been overridden.

onValidationError(vPropertyValue, sErrorMessage)

Callback method invoked when an attempt to update an module:br/presenter/property/EditableProperty results in a validation error.

Implementation of this method is optional, and no action will be taken if the method is invoked but has not been overridden.

Parameters:
Name Type Description
vPropertyValue Object The value that led to the validation error.
sErrorMessage String The description of the validation error.
Implementations:
  • module:br/presenter/node/FieldValuePropertyListener#onValidationError

onValidationSuccess()

Callback method invoked when an attempt to update an module:br/presenter/property/EditableProperty does not result in a validation error.

Implementation of this method is optional, and no action will be taken if the method is invoked but has not been overridden.

Implementations:
  • module:br/presenter/node/FieldValuePropertyListener#onValidationSuccess