Form
Last updated
Last updated
A form is an object that provides an UI and/or contains business logic; it's the basic user interface object in Servoy. The UI of a Form is built up of Form Parts, which in turn contain Elements (and layout containers in case of advanced layout).
Forms are also a unit of scope in Servoy, meaning that forms can have variables and methods attributed to them.
Type | Name | Summary |
---|---|---|
Additional information, such as programmer notes about this form's purpose.
Type String
Sample
The names of the database server and table that this form is linked to.
Type String
Sample
Gets the deprecation info for this element.
Type String the deprecation info for this object or null if it is not deprecated
Sample
Property to get and add design-time properties for a component.
Type Object map of the design-time properties
The encapsulation mode of this persist. The following can be used/checked:
Public (not a separate option - if none of the below options are selected)
Hide in scripting; Module Scope - it will not be available in scripting from any other context except the form itself. Available in designer for the same module
Module Scope - it will be available in both scripting and designer, but only in the same module
Hide Dataproviders (checked by default) - the form's dataproviders will not be available from any other context except from the form itself
Hide Foundset (checked by default) - the form's foundset will not be available from any other context except from the form itself
Hide Controller - the form's controller will not be available from any other context except from the form itself
Hide Elements (checked by default) - the form's elements will not be available from any other context except from the form itself
Hide Containers (checked by default) - the form's containers will not be available from any other context except from the form itself.
Type Number the encapsulation mode/level of the persist.
Sample
The selected parent (extended element) for the element (form).
Type Number the parent
Sample
Type Boolean
The height of the form in pixels.
Type Number
The default sort order only when the form loads. This is applied each time an internal SQL query is being executed (find, find-all, open form); and is only executed when no other manual sort has been performed on the foundset.
Type String
Sample
The name of the form.
Type String
Sample
Property that tells the form to use a named foundset instead of the default foundset. When "separate" as special value is specified the form will always create a copy of assigned foundset and therefor become separated from other foundsets. When "empty" it will initially load an empty foundset. When a global relation name it will load the a related foundset.
Type String
Sample
The navigator (previously named "controller") that is used to control/navigate to the form. The navigator is shown at the left or at the right side of the form, depending on the page orientation.
The following options are available:
-none- - no navigator is assigned. DEFAULT - the Servoy default navigator is assigned. IGNORE - the navigator last assigned to a previous form. Custom - a custom navigator based on a selected form.
Type Number
Scrollbar options for the vertical and horizontal scrollbars. Each of the vertical and horizontal scrollbars can be configured to display all the time, to display only when needed or to never display.
Type Number
Sample
Returns the value of the selectionMode property.
Type Number one of IForm#SELECTION_MODE_DEFAULT, IForm#SELECTION_MODE_SINGLE and IForm#SELECTION_MODE_MULTI.
Sample
The Cascading Style Sheet (CSS) class name applied to the form.
Type String
Sample
The text that displays in the title bar of the form window. NOTE: Data tags and Servoy tags can be used as part of the title text.
Type String
Sample
When set, the form is transparent.
Type Boolean
If true then the min-height css property will be set for this form so it has a default minimum height.
Can return null so that the default system value should be used.
Type Boolean true if it should use the min-height in the browser
If true then the min-with css property will be set for this form so it has a default minimum width
Can return null so that the default system value should be used.
Type Boolean true if it should use the min-width in the browser
The width of the form in pixels.
Type Number
This method is triggered when the form wants to hide; this will be called before onHide, and should be used to return if this form can be hidden or not. Before the form is really going to hide, this form and all the forms that this form is also showing in its ui hierarchy must allow the hide (return true in onBeforeHide - if present).
For example, when using onBeforeHide with showFormInDialog, the form will not close by clicking the dialog close box (X) if the main form in the dialog or any of the other visible forms in tabpanels/containers are nested in the main are returning false.
If the hide operation is allowed for all the forms that are in the affected visible hierarchy, then the onHide handler/method will get called on them as well afterwards.
So this handler (on each form) can be used to validate input in the main form and/or any nested visible forms - that are getting ready to hide.
Parameters
JSEvent event the event that triggered the action
Returns: Boolean
Sample