JSForm

Overview

The JSForm is a Solution Model wrapper for forms, providing properties and methods to dynamically manage and interact with forms in an application. It includes constants for specifying foundset behavior and selection modes, properties like dataSource, name, and selectionMode, and methods for creating, accessing, and manipulating form components, variables, methods, and layout containers.

With encapsulation levels, event handlers (e.g., onShow, onHide, onRecordSelection), and integration of design-time properties, JSForm is pivotal for customizing forms at runtime. It supports responsive layouts, default sorting, transparent forms, and CSS-based positioning, enabling developers to tailor the UI dynamically while managing forms effectively.

Please refer to the Form section of this documentation for details.

Constants Summarized

Type
Name
Summary

Constant used for form namedFoundset property.

Constant used for form selectionMode property.

Constant used for form selectionMode property.

Constant used for form selectionMode property.

Constant used for form namedFoundset property.

Properties Summarized

Type
Name
Summary

The names of the database server and table that this form is linked to.

Get or set the encapsulation level for the form.

A JSForm instance representing the super form of this form, if this form has a super form.

The default sort order only when the form loads.

The height of the form in pixels.

The width of the form in pixels.

The name of the form.

Property that tells the form to use a named foundset instead of the default foundset.

The navigator (previously named "controller") that is used to control/navigate to the form.

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.

Method that is executed when the data in one of the form's component is successfully changed and the onDataChange callback from the component does not exist or exists and returned true.

The method that is triggered when focus is gained by a component inside the form.

The method that gets triggered when focus is lost by a component inside the form.

This method is triggered when the form gets hidden.

The method that is triggered when a form is loaded/reloaded from the repository; used to alter elements, set globals, hide toolbars, etc; onShow method can also be assigned.

The method that is triggered when a user starts editing a record (for example by clicking into a cell of a table, or editing a field who's data-provider is from that record).

The method that is triggered when a record is being saved.

The method that is triggered each time a record is selected.

The method that gets triggered when resize occurs.

The method that is triggered EVERY TIME the form is displayed; an true argument will be passed to the method if this is the first time the form is displayed.

The method that overrides the Servoy menu item Select > Sort.

The method that is triggered when a form is unloaded from the repository.

Returns true if this form is in responsive mode

Scrollbar options for the vertical and horizontal scrollbars.