1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
21 module com
{ module sun
{ module star
{ module form
{ module validation
{
23 /** specifies the model of a form control which supports live validation of its
26 <p>Validatable control models support setting a validator with dynamic
27 validity constraints, and broadcasting changes in their value as well as the
28 validity of their value.</p>
30 service ValidatableControlModel
32 /** specifies the basic functionality for a form control model
34 <p>Via this service, validatable control models inherit the
35 com::sun::star::util::XCloneable interface.<br/>
36 If a validatable control model, at which a validator has been set (via
37 XValidatable::setValidator()), is being cloned, then the
38 validator is also set at the clone. Effectively, this means that
39 both control model instances share the same validator instance.</p>
41 service com
::sun
::star
::form
::FormControlModel
;
43 /** enables support for validating the value of the control model
45 <p>Setting and retrieving the current validator of the control model is
46 possible via the XValidatable interface (which
47 XValidatableFormComponent is derived from).</p>
49 <p>Easy access to the current value of the control, as well as it's validity
50 (relative to the active validator), is provided by the methods XValidatableFormComponent::isValid()
51 and XValidatableFormComponent::getCurrentValue().</p>
53 <p>Note that the type of the value provided by XValidatableFormComponent::getCurrentValue()
54 is not specified here, but depends on the concrete control type.</p>
56 interface XValidatableFormComponent
;
58 /** enables support for validators with dynamic validity constraints.
60 <p>As soon as a validator is set via XValidatable::setValidator(), the validatable
61 control model registers itself as listener. If the validity constraint of the validator
62 changes, the ValidatableControlModel re-validates its current valid, and
63 broadcasts any resulting changes to all its XFormComponentValidityListener, if
66 interface XValidityConstraintListener
;
72 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */