Committing Controls

From Apache OpenOffice Wiki
< Documentation‎ | DevGuide
Revision as of 15:46, 21 December 2020 by DiGro (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The second direction of the data transfer is back from what the user enters into the control. The text entered by a user is immediately forwarded to the value property of the control model. This way, both the control and the control model are always consistent.

Next, the content property is transferred into the data column the control is bound to. As opposed to the first step, this is not done automatically. Instead, this control is committed actively.

Committing is the process of transferring the current value of the control to the database column. The interface used for this is that provides the method commit. Note that the XBoundComponent is derived from This means that listeners are added to a component to monitor and veto the committing of data.

The following diagram shows what happens when the user decides to save the current record after changing a control:

Control committing data

Note that in the diagram, there is a controller instance involved. In general, this is any instance capable of controlling the user-form interaction. In Apache OpenOffice, for every document view and form, there is an instance of the service, together with some not-yet UNO-based code that takes on the role of a controller.

Content on this page is licensed under the Public Documentation License (PDL).
Personal tools
In other languages