Returns Supported Clients Sample Returns Supported Clients Sample Returns Supported Clients Sample Returns Supported Clients Sample Returns Supported Clients Sample Returns Supported Clients Sample Returns Supported Clients Sample Returns Supported Clients Sample Returns Supported Clients Sample Returns Supported Clients Sample Returns Supported Clients Sample Returns Supported Clients Sample Returns Supported Clients Sample Returns Supported Clients Sample Returns Supported Clients Sample Returns Supported Clients Sample Returns Supported Clients Sample Returns Supported Clients Sample Returns Supported Clients Sample Returns Supported Clients Sample Returns Supported Clients Sample Returns Supported Clients Sample Returns Supported Clients Sample Returns Supported Clients Sample Supported Clients Sample Supported Clients Sample Supported Clients Sample Supported Clients Sample Supported Clients Sample Supported Clients Sample Supported Clients Sample Supported Clients Sample Supported Clients Sample Supported Clients Sample Supported Clients Sample Supported Clients Sample Supported Clients Sample Supported Clients Sample Parameters Returns Supported Clients Sample Parameters Returns Supported Clients Sample Parameters Supported Clients Sample Parameters Returns Supported Clients Sample Parameters Returns Supported Clients Sample Parameters Returns Supported Clients Sample Parameters Returns Supported Clients Sample Parameters Returns Supported Clients Sample Parameters Supported Clients Sample Parameters Supported Clients Sample Parameters Returns Supported Clients Sample Parameters Returns Supported Clients Sample Parameters Supported Clients Sample Parameters Supported Clients Sample Parameters Supported Clients Sample Parameters Supported Clients Sample Parameters Supported Clients Sample
Dec 04, 2023 10:32
Supported Clients
SmartClient
WebClient
NGClient
MobileClient
Property Summary
String
borderType
The type, color and style of border.
String
comment
String
dataSource
The names of the database server and table that this form is linked to.
String
defaultPageFormat
The default page format for the form.
String
deprecated
Gets the deprecate info for this element
Object
designTimeProperties
Property to get and add design-time properties for a component.
Number
encapsulation
The encapsulation mode of this persist.
Number
extendsForm
The selected parent (extended element) for the element (form).
Boolean
formComponent
String
initialSort
The default sort order only when the form loads.
String
name
The name of the form.
String
namedFoundSet
Property that tells the form to use a named foundset instead of the default foundset.
Number
navigator
The navigator (previously named "controller")
that is used to control/navigate to the form.
Number
paperPrintScale
The percentage value the printed page is enlarged or reduced to; the size of the printed form
is inversely proportional.
String
rowBGColorCalculation
The calculation dataprovider used to add background color and highlight selected or alternate rows.
Number
scrollbars
Scrollbar options for the vertical and horizontal scrollbars.
Number
selectionMode
Returns the value of the selectionMode property.
Boolean
showInMenu
When set, the form is displayed under the Window menu.
String
styleClass
The Cascading Style Sheet (CSS) class name applied to the form.
String
styleName
The name of the Servoy style that is being used on the form.
String
titleText
The text that displays in the title bar of the form window.
Boolean
transparent
When set, the form is transparent.
Number
view
The default form view mode.
Number
width
The width of the form in pixels.
Command Summary
void
onDeleteAllRecords
The method that overrides the Servoy menu item Select > Delete All.
void
onDeleteRecord
The method that overrides the Servoy menu item Select > Delete Record (or keyboard shortcut).
void
onDuplicateRecord
The method that overrides the Servoy menu item Select > Duplicate Record (or keyboard shortcut).
void
onFind
The method that overrides the Servoy menu item Select > Find (or keyboard shortcut) in Data (ready) mode.
void
onInvertRecords
The method that overrides the Servoy menu item Select > Invert Records.
void
onNewRecord
The method that overrides the Servoy menu item Select > New Record (or keyboard shortcut).
void
onNextRecord
The method that overrides the Servoy menu item Select > Next Record.
void
onOmitRecord
The method that overrides the Servoy menu item Select > Omit Record.
void
onPreviousRecord
The method that overrides the Servoy menu item Select > Previous Record.
void
onPrintPreview
The method that overrides the Servoy menu item File > Print Preview.
void
onSearch
The method that overrides the Servoy menu item Select > Search (or keyboard shortcut) in Find mode.
void
onShowAllRecords
The method that overrides the Servoy menu item Select > Show All (or keyboard shortcut).
void
onShowOmittedRecords
The method that overrides the Servoy menu item Select > Show Omitted Records.
void
onSort
The method that overrides the Servoy menu item Select > Sort.
Event Summary
Boolean
onBeforeHide(event)
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.
Number
onDrag(event)
The method that is triggered when (non Design Mode) dragging occurs.
void
onDragEnd(event)
The method that is triggered when (non Design Mode) dragging end occurs.
Boolean
onDragOver(event)
The method that is triggered when (non Design Mode) dragging over a component occurs.
Boolean
onDrop(event)
The method that is triggered when (non Design Mode) dropping occurs.
Boolean
onElementDataChange(oldValue, newValue, event)
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
Boolean
onElementFocusGained(event)
The method that is triggered when focus is gained by a component inside the form.
Boolean
onElementFocusLost(event)
The method that gets triggered when focus is lost by a component inside the form.
void
onHide(event)
This method is triggered when the form gets hidden.
void
onLoad(event)
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.
Boolean
onRecordEditStart(event)
The method that is triggered when a user clicks into a column on the form.
Boolean
onRecordEditStop(record, event)
The method that is triggered when a record is being saved.
void
onRecordSelection(event)
The method that is triggered each time a record is selected.
void
onRender(event)
The method that is executed when the component is rendered.
void
onResize(event)
The method that gets triggered when resize occurs.
void
onShow(firstShow, event)
The method that is triggered EVERY TIME the form is displayed; an argument must be passed to the method if this is the first time the form is displayed.
void
onUnLoad(event)
The method that is triggered when a form is unloaded from the repository.
Property Details
borderType
The type, color and style of border.
This property is automatically set to "DEFAULT" when a new form is created.
comment
dataSource
The names of the database server and table that this form is linked to.
defaultPageFormat
The default page format for the form.
deprecated
Gets the deprecate info for this element
designTimeProperties
Property to get and add design-time properties for a component.
encapsulation
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 - not available in scripting from any other context except the form itself. Available in designer for the same module.
- Module Scope - available in both scripting and designer but only in the same module.
- Hide Dataproviders (checked by default)
- Hide Foundset (checked by default)
- Hide Controller (checked by default)
- Hide Elements (checked by default)
extendsForm
The selected parent (extended element) for the element (form).
formComponent
initialSort
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.
name
The name of the form.
namedFoundSet
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.
navigator
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.
paperPrintScale
The percentage value the printed page is enlarged or reduced to; the size of the printed form
is inversely proportional. For example, if the paperPrintScale is 50, the printed form will be
enlarged 200%.
rowBGColorCalculation
The calculation dataprovider used to add background color and highlight selected or alternate rows.
The default is -none-.
NOTE: This property has been deprecated and is kept visible for legacy purposes. Use CSS Row Styling & onRender event instead.
scrollbars
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.
selectionMode
Returns the value of the selectionMode property.
showInMenu
When set, the form is displayed under the Window menu.
If it is not set, the form will be 'hidden'.
NOTE: This is only applicable for Servoy Client. Servoy Developer always shows all forms so that
developers have access to all forms within a solution during development.
styleClass
The Cascading Style Sheet (CSS) class name applied to the form.
styleName
The name of the Servoy style that is being used on the form.
titleText
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.
transparent
When set, the form is transparent.
view
The default form view mode.
The view can be changed using a method at runtime. The following views are available:
- Record view
- List view
- Record view (locked)
- List view (locked)
- Table View (locked)
NOTE: Only Table View (locked) uses asynchronized related data loading.
This feature defers all related foundset data loading to the background - enhancing
the visual display of a related foundset.
width
The width of the form in pixels.
Command Details
onDeleteAllRecords
The method that overrides the Servoy menu item Select > Delete All.
This property is automatically set to "DEFAULT" (no override) when the form is created.
onDeleteRecord
The method that overrides the Servoy menu item Select > Delete Record (or keyboard shortcut).
This property is automatically set to "DEFAULT" (no override) when the form is created.
onDuplicateRecord
The method that overrides the Servoy menu item Select > Duplicate Record (or keyboard shortcut).
This property is automatically set to "DEFAULT" (no override) when the form is created.
onFind
The method that overrides the Servoy menu item Select > Find (or keyboard shortcut) in Data (ready) mode.
This property is automatically set to "DEFAULT" (no override) when the form is created.
onInvertRecords
The method that overrides the Servoy menu item Select > Invert Records.
This property is automatically set to "DEFAULT" (no override) when the form is created.
onNewRecord
The method that overrides the Servoy menu item Select > New Record (or keyboard shortcut).
This property is automatically set to "DEFAULT" (no override) when the form is created.
onNextRecord
The method that overrides the Servoy menu item Select > Next Record.
This property is automatically set to "DEFAULT" (no override) when the form is created.
onOmitRecord
The method that overrides the Servoy menu item Select > Omit Record.
This property is automatically set to "DEFAULT" (no override) when the form is created.
onPreviousRecord
The method that overrides the Servoy menu item Select > Previous Record.
This property is automatically set to "DEFAULT" (no override) when the form is created.
onPrintPreview
The method that overrides the Servoy menu item File > Print Preview.
This property is automatically set to "DEFAULT" (no override) when the form is created.
onSearch
The method that overrides the Servoy menu item Select > Search (or keyboard shortcut) in Find mode.
This property is automatically set to "DEFAULT" (no override) when the form is created.
onShowAllRecords
The method that overrides the Servoy menu item Select > Show All (or keyboard shortcut).
This property is automatically set to "DEFAULT" (no override) when the form is created.
onShowOmittedRecords
The method that overrides the Servoy menu item Select > Show Omitted Records.
This property is automatically set to "DEFAULT" (no override) when the form is created.
onSort
The method that overrides the Servoy menu item Select > Sort.
This property is automatically set to "DEFAULT" (no override) when the form is created.
Event Details
onBeforeHide(event)
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.
JSEvent
event
the event that triggered the action
onDrag(event)
The method that is triggered when (non Design Mode) dragging occurs.
JSDNDEvent
event
the event that triggered the action
onDragEnd(event)
The method that is triggered when (non Design Mode) dragging end occurs.
JSDNDEvent
event
the event that triggered the action
onDragOver(event)
The method that is triggered when (non Design Mode) dragging over a component occurs.
JSDNDEvent
event
the event that triggered the action
onDrop(event)
The method that is triggered when (non Design Mode) dropping occurs.
JSDNDEvent
event
the event that triggered the action
onElementDataChange(oldValue, newValue, event)
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
Object
oldValue
old value
Object
newValue
new value
JSEvent
event
the event that triggered the action
onElementFocusGained(event)
The method that is triggered when focus is gained by a component inside the form.
JSEvent
event
the event that triggered the action
onElementFocusLost(event)
The method that gets triggered when focus is lost by a component inside the form.
JSEvent
event
the event that triggered the action
onHide(event)
This method is triggered when the form gets hidden.
Return value is DEPRECATED: false return value should no longer be used. In the past, if the onHide method returned false, the form hide could be prevented from happening
in some cases (for example, when using onHide with showFormInDialog, the form will not close by clicking the dialog close box (X)). But that lead to
unexpected situations when the form being hidden had visible nested children it it (tab panels, splits etc.) because only the current form would
decide if hide could be denied, and all other forms, even if they returned false in their on-hide, would not be able to block the hide if this form allowed it.
So those nested forms might think that they are still visible even though they are not.
Please use the new onBeforeHide method/handler instead if you want to prevent forms from hiding.
JSEvent
event
the event that triggered the action
onLoad(event)
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.
NOTE: onShow should be used to access current foundset dataproviders; onLoad cannot be used because the foundset data is not loaded until after the form is loaded.
Also calls to loadRecords() should be done in the onShow method and not in the onLoad method
If you call loadRecords() in the onShow method, you may want to set the namedFoundSet property of the form to 'empty' to prevent the first default form query.
NOTE: the onLoad event bubbles down, meaning that the onLoad is first fired on the parent then on a tab in a tabpanel (and in tab of that tab panels if you are 3 deep)
JSEvent
event
the event that triggered the action
onRecordEditStart(event)
The method that is triggered when a user clicks into a column on the form.
NOTE: There is a small "e" displayed in the lower left side of the Servoy Client screen in the status area at the bottom of the window when the record is being edited.
JSEvent
event
the event that triggered the action
onRecordEditStop(record, event)
The method that is triggered when a record is being saved.
A record is saved when a user clicks out of it (for example on an empty part of the layout or to another form).
When the method returns false (for example as part of a validation), the user cannot leave the record, for example in
a table view a user cannot move to another record when the callback returns false.
JSRecord
record
record being saved
JSEvent
event
the event that triggered the action
onRecordSelection(event)
The method that is triggered each time a record is selected.
If a form is in List view or Special table view - when the user clicks on it.
In Record view - after the user navigates to another record using the slider or clicks up or down for next/previous record.
NOTE: Data and Servoy tag values are returned when the onRecordSelection method is executed.
NOTE: this will also fire if the selection goes to -1 because the foundset is cleared. So foundset.getSelectedRecord() can return null.
JSEvent
event
the event that triggered the action
onRender(event)
The method that is executed when the component is rendered.
JSRenderEvent
event
the render event
onResize(event)
The method that gets triggered when resize occurs.
JSEvent
event
the event that triggered the action
onShow(firstShow, event)
The method that is triggered EVERY TIME the form is displayed; an argument must be passed to the method if this is the first time the form is displayed.
NOTE: onShow can be used to access current foundset dataproviders; onLoad cannot be used because the foundset data is not loaded until after the form is loaded.
NOTE: the onShow event bubbles down, meaning that the onShow event of a form displayed in a tabPanel is fired after the onShow event of the parent.
Boolean
firstShow
form is shown first time after load
JSEvent
event
the event that triggered the action
onUnLoad(event)
The method that is triggered when a form is unloaded from the repository.
NOTE: Forms can be prevented from being removed from memory by referencing the form object in a global variable or inside an array inside a global variable. Do take care using this technique.
Forms take up memory and if too many forms are in memory and cannot be unloaded, there is a possibility of running out of memory.
JSEvent
event
the event that triggered the action