Forms

From Apache OpenOffice Wiki
< Documentation‎ | DevGuide
Revision as of 19:52, 3 July 2018 by Sancho (Talk | contribs)

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



The OpenOffice.org API features different kinds of forms, namely the com.sun.star.form.component.Form, com.sun.star.form.component.HTMLForm, and com.sun.star.form.component.DataForm. The two different aspects described with these services are HTML forms used in HTML documents, and data aware forms used to access databases. Data awareness is discussed thoroughly in Data Awareness.

Documentation note.png Though different services exist for HTML and data aware forms, there is only one form implementation in OpenOffice.org that implements both services simultaneously.

The common denominator of HTML forms and data aware forms is described in the com.sun.star.form.component.Form service. It includes the FormComponent and FormComponents service, in addition to the following elements:

com.sun.star.form.XForm

This interface identifies the component as a form that can be done with other methods, such as the com.sun.star.lang.XServiceInfo interface. The com.sun.star.form.XForm interface distinguishes a form component as a form. The XForm interface inherits from com.sun.star.form.XFormComponent to indicate the difference, and does not add any further operations.

com.sun.star.awt.XTabControllerModel

This is used for controlling tab ordering and control grouping. As a logical form is a container for control models, it is a natural place to administer information about the relationship of its control children. The tab order, that is, the order in which the focus travels through the controls associated with the control models when the user presses the Tab key, is a relationship, and thus is maintained on the form.
Note that changing the tab order through this interface also affects the models. The com.sun.star.form.FormControlModel service has an optional property TabIndex that contains the relative position of the control in the tabbing order. For example, a straightforward implementation of <idlml>com.sun.star.awt.XTabControllerModel:setControlModels</idlml>() would be simply to adjust all the TabIndex properties of the models passed to this method.
Content on this page is licensed under the Public Documentation License (PDL).
Personal tools
In other languages