1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24#ifndef __com_sun_star_form_validation_ValidatableBindableControlModel_idl__ 25#define __com_sun_star_form_validation_ValidatableBindableControlModel_idl__ 26 27#ifndef __com_sun_star_form_validation_ValidatableControlModel_idl__ 28#include <com/sun/star/form/validation/ValidatableControlModel.idl> 29#endif 30 31#ifndef __com_sun_star_form_binding_BindableControlModel_idl__ 32#include <com/sun/star/form/binding/BindableControlModel.idl> 33#endif 34//============================================================================= 35 36module com { module sun { module star { module form { module validation { 37 38/** specifies a control model which supports both binding to an external value supplier, 39 and to an external validator. 40 41 <p>There are two methods how the value which is represented by a control model 42 can interact with other components (well, except the trivial ones accessible 43 by using <type scope="com::sun::star::beans">XPropertySet</type>): 44 <ul><li>binding the value to an external component via <type scope="com::sun::star::form::binding">XBindableValue</type></li> 45 <li>validating the current value by an external component, via <type>XValidatable</type> and <type>XValidator</type></li> 46 </ul></p> 47 48 <p>The <type>ValidatableBindableControlModel</type> services describes the interaction of these concepts 49 for control models which support both of them.</p> 50*/ 51service ValidatableBindableControlModel 52{ 53 /** specifies support for validating the current value of the control 54 */ 55 service ValidatableControlModel; 56 57 /** specifies support for binding the control value to an external component 58 59 <p>If a value binding is established at the control model (by using 60 <member scope="com::sun::star::form::binding">XBindableValue::setValueBinding</member> with a non-<NULL/> 61 binding), this binding is analyzed for validation support. If it is present (read: if the 62 binding also supports the <type>XValidator</type> interface), the binding is also 63 established as validator, as if it has been passed to <member>XValidatable::setValidator</member>.<br/> 64 If, while this binding is active (in both its roles as value binding and validator), 65 an attempt is made to establish another validator, this is blocked with raising a 66 <type scope="com::sun::star::util">VetoException</type> upon calling <member>XValidatable::setValidator</member>.</p> 67 */ 68 service com::sun::star::form::binding::BindableControlModel; 69}; 70 71//============================================================================= 72 73}; }; }; }; }; 74 75#endif 76