Forms

From Apache OpenOffice Wiki
Jump to: navigation, search



The Apache OpenOffice 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 Apache OpenOffice 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 setControlModels() 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