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.
|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
FormComponents service, in addition to the following elements:
- 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
XForminterface inherits from com.sun.star.form.XFormComponent to indicate the difference, and does not add any further operations.
- 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
TabIndexthat 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
TabIndexproperties of the models passed to this method.
|Content on this page is licensed under the Public Documentation License (PDL).|