Overview | Module | Use | Devguide | Index

Services' Summary | Interfaces' Summary | Properties' Summary | Services' Details | Interfaces' Details | Properties' Details

:: com :: sun :: star :: form :: binding ::
unpublished | service BindableDataAwareControlModel |
Usage Restrictions not published Description is a specialization of the ::com::sun::star::form::DataAwareControlModel which additionally supports binding to external value suppliers. Control models usually have some kind of value property, which reflects the very current content of the controls associated with this model. For instance, for an ::com::sun::star::form::component::TextField, this would be the ::com::sun::star::awt::UnoControlEditModel::Text property of the base service. Similarly, a ::com::sun::star::form::component::CheckBox has a property ::com::sun::star::awt::UnoControlCheckBoxModel::State, which reflects the current check state. Usual ::com::sun::star::form::DataAwareControlModels can be bound to a column of a ::com::sun::star::form::component::DataForm, and exchange their content with such a column. In particular, when the ::com::sun::star::form::component::DataForm is moved to a different record, then the bound control model is updated with the value of it's column in this particular row. On the other hand, when any change in the control model (e.g. resulting from a user entering data in a control associated with the control model) is committed (::com::sun::star::form::XBoundComponent::commit), then the actual data of the control model is written into the associated ::com::sun::star::form::component::DataForm column. BindableDataAwareControlModel's additionally support an alternative value binding, which forces them to exchange their value with another foreign instance. In some sense, they are an abstraction of the data aware control models, which only support a specialized, hard-coded value binding (namely the binding to a ::com::sun::star::form::component::DataForm column). For this, they provide the XBindableValue interface which allows to set an external component to exchange the value with. The following rules apply when a data aware control model is bound to an external value binding: Priority External value bindings overrule any active SQL-column binding. If an external component is bound to a control model which currently has an active SQL binding, this SQL binding is suspended, until the external binding is revoked. Activation An external value binding becomes effective as soon as it is set. This is a difference to SQL bindings, which only are effective when the parent form of the control model is loaded (::com::sun::star::form::XLoadable). Immediacy When a BindableDataAwareControlModel is bound to an external value, then every change in the control model's value is immediately reflected in the external binding. This is a difference to SQL bindings of most ::com::sun::star::form::DataAwareControlModel's, where changes in the control model's value are only propagated to the bound column upon explicit request via ::com::sun::star::form::XBoundComponent::commit. Note that this restriction is inherited from the BindableControlModel. Cloning ::com::sun::star::form::FormControlModels support cloning themselves via the ::com::sun::star::util::XCloneable interface which they inherit from the ::com::sun::star::awt::UnoControlModel service. When a BindableDataAwareControlModel is cloned while it has an active external value binding, then the clone is also bound to the same binding instance. Note that this restriction is inherited from the BindableControlModel. When a BindableDataAwareControlModel is being bound to an external value, using XBindableValue::setValueBinding, then the control model (it's value property, respectively) and the external value are initially synchronized by setting the external value (XValueBinding::getValue) at the control model.

Included Services - Summary
::com::sun::star::form::DataAwareControlModel | specifies the functionality for binding the control model to a column of an SQL ::com::sun::star::form::component::DataForm.
BindableControlModel | specifies the functionality for alternatively binding the control model to an external value.

Included Services - Details
::com::sun::star::form::DataAwareControlModel
Description specifies the functionality for binding the control model to a column of an SQL ::com::sun::star::form::component::DataForm.
BindableControlModel
Description specifies the functionality for alternatively binding the control model to an external value.

Top of Page

Copyright © 2000, 2013 LibreOffice contributors and/or their affiliates. All rights reserved.

LibreOffice was created by The Document Foundation, based on OpenOffice.org, which is Copyright 2000, 2010 Oracle and/or its affiliates.

The Document Foundation acknowledges all community members, please find more info at our website.

Privacy Policy | Impressum (Legal Info) | Copyright information: The source code of LibreOffice is licensed under the GNU Lesser General Public License (LGPLv3). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.