Singleton
caplin.presenter.validator

CrossValidationPropertyBinder

The CrossValidationPropertyBinder is used to associate a single caplin.presenter.validator.CrossPropertyValidator instance with multiple caplin.presenter.property.Property instances.

The caplin.presenter.property.Property class does not directly support the registration of cross property validators, so the CrossValidationPropertyBinder bridges this gap by creating a standard caplin.core.Validator that proxies all validation calls to the underlying caplin.presenter.validator.CrossPropertyValidator.

Constructor Summary

Attributes Name and Description
caplin.presenter.validator.CrossValidationPropertyBinder()

Method Summary

Attributes Name and Description
int bindValidator(Object mProperties, caplin.presenter.validator.CrossPropertyValidator oCrossPropertyValidator)

Binds the given validator to the set of named properties provided.

void unbindValidator(int nBindId)

Unbinds a cross-property validator previously set-up using #bindValidator.

Constructor Detail

caplin.presenter.validator.CrossValidationPropertyBinder()

Method Detail

int bindValidator(Object mProperties, caplin.presenter.validator.CrossPropertyValidator oCrossPropertyValidator)

Binds the given validator to the set of named properties provided.

Parameters
Object mProperties The set of named properties that oCrossPropertyValidator expects.
caplin.presenter.validator.CrossPropertyValidator oCrossPropertyValidator The validator that will validate mProperties.
Returns
A numeric bind ID that can be used to later unbind this validator using #unbindValidator.
See
#unbindValidator

void unbindValidator(int nBindId)

Unbinds a cross-property validator previously set-up using #bindValidator.

Parameters
int nBindId A numeric bind ID previously returned by #bindValidator.
See
#bindValidator