Language:

The Free and Open Productivity Suite
Apache OpenOffice 4.1.4 released

Developer's Guide

API

SDK

Tips 'n' Tricks

Miscellaneous


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

unpublished 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 - Summary
::com::sun::star::form::FormControlModel

specifies the basic functionality for a form control model (details)

Exported Interfaces - Summary
XValidatableFormComponent

enables support for validating the value of the control model (details)

XValidityConstraintListener

enables support for validators with dynamic validity constraints. (details)

Included Services - Details
::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 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 - Details
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 XValidatable interface (which 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 XValidatableFormComponent::isValid and XValidatableFormComponent::getCurrentValue.

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

XValidityConstraintListener
Description
enables support for validators with dynamic validity constraints.

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


 
Top of Page

Apache Software Foundation

Copyright & License | Privacy | Contact Us | Donate | Thanks

Apache and the Apache feather logo are trademarks of The Apache Software Foundation. OpenOffice, OpenOffice.org and the seagull logo are registered trademarks of The Apache Software Foundation. Other names appearing on the site may be trademarks of their respective owners.