:: com :: sun :: star :: form :: validation ::

service ValidatableControlModel
Usage Restrictions
not published
Description
specifies the model of a form control which supports live validation of its input.

Validatable control models support setting a validator with dynamic validity constraints, and broadcasting changes in their value as well as the validity of their value.


Included Services
::com::sun::star::form::FormControlModel
Description
specifies the basic functionality for a form control model

Via this service, validatable control models inherit the ::com::sun::star::util::XCloneable interface.
If an validatable control model, at which a validator has been set (via ::com::sun::star::form::validation::XValidatable::setValidator ), is being cloned, then the validator is also set at the clone. Effectively, this means that both control model instances share the same validator instance.

Exported Interfaces
::com::sun::star::form::validation::XValidatableFormComponent
Description
enables support for validating the value of the control model

Setting an retrieving the current validator of the control model is possible via the ::com::sun::star::form::validation::XValidatable interface (which ::com::sun::star::form::validation::XValidatableFormComponent is derived from).

Easy access to the current value of the control, as well as it's validity (relative to the active validator), is provided by the methods ::com::sun::star::form::validation::XValidatableFormComponent::isValid and ::com::sun::star::form::validation::XValidatableFormComponent::getCurrentValue .

Note that the type of the value provided by ::com::sun::star::form::validation::XValidatableFormComponent::getCurrentValue is not specified here, but depends on the concrete control type.

::com::sun::star::form::validation::XValidityConstraintListener
Description
enables support for validators with dynamic validity constraints.

As soon as a validator is set via ::com::sun::star::form::validation::XValidatable::setValidator , the validatable control model registers itself as listener. If the validity constraint of the validator changes, the ::com::sun::star::form::validation::ValidatableControlModel re-validates it's current valid, and broadcasts any resuling changes to all its ::com::sun::star::form::validation::XFormComponentValidityListener , if necessary.


 
Top of Page