Skip to end of metadata
Go to start of metadata

Refresh page Apr 19, 2024 03:34

Supported Clients
SmartClient WebClient NGClient MobileClient

Property Summary
String comment
Number firstForm The first form that loads when a solution is deployed.
String i18nDataSource The i18n database server connection and database table that stores the i18n keys for a solution.
Number loginForm The name of the login form that loads when a solution is deployed.
String loginSolutionName Get the first module that is also a login solution.
String modulesNames The list of modules that have been added to a solution.
Boolean mustAuthenticate Flag that tells if authentication is needed in order to access the solution.
Number solutionType The type of a solution; can be "Normal" (non-module), "Module", "Web client only", "Smart client only", "Login", "Authenticator", "Pre-import hook module", "Post-import hook module", "Mobile".
Number styleSheet The custom CSS used by the solution (a MEDIA lib entry).
Number textOrientation The direction that text is displayed.
String titleText The menu bar title of a solution.
String version This is the version of the solution, this can be any kind of string but try to follow "Semantic Versioning".

Event Summary
void onAutoSaveFailed(recordMarkers) The method that is executed when autosave results in validation or save failures.
void onBeforeLogin(|) The method that is to onOpen just that it executes before the login on solutions with a login form (not login soliution).
Boolean onClose(force) The method that is executed when a solution closes.
void onDataBroadcast(dataSource, action, pks, cached) Method that is executed when data broadcast occurs.
Boolean onError(ex) The method that is executed when a solution opens and an error occurs.
void onOpen(arg, |) The method that is executed when a solution opens.

Property Details

comment

Returns

Supported Clients

SmartClient,WebClient,NGClient

Sample

 

firstForm

The first form that loads when a solution is deployed.

NOTE: If the Login form is specified, then the firstForm is the first form that will load next after the loginForm.

Returns

Supported Clients

SmartClient,WebClient,NGClient,MobileClient

Sample

 

i18nDataSource

The i18n database server connection and database table that stores the i18n keys for a solution.

Returns

Supported Clients

SmartClient,WebClient,NGClient

Sample

 

loginForm

The name of the login form that loads when a solution is deployed.

Returns

Supported Clients

SmartClient,WebClient,NGClient,MobileClient

Sample

 

loginSolutionName

Get the first module that is also a login solution.

Returns

Supported Clients

SmartClient,WebClient,NGClient

Sample

 

modulesNames

The list of modules that have been added to a solution.

Returns

Supported Clients

SmartClient,WebClient,NGClient,MobileClient

Sample

 

mustAuthenticate

Flag that tells if authentication is needed in order to access the solution.
If unchecked, the Smart Client will always require authentication, regardless of this setting.
If checked, authentication is required, and either a provided loginSolution or otherwise the default Servoy login mechanism will be used.
If default Servoy login mechanism is used, the "servoy.webclient.basic.authentication" setting on the Admin Page can be used to enable the use of the standard browser basic authentication.

Returns

Supported Clients

SmartClient,WebClient,NGClient,MobileClient

Sample

 

solutionType

The type of a solution; can be "Normal" (non-module), "Module", "Web client only", "Smart client only",
"Login", "Authenticator", "Pre-import hook module", "Post-import hook module", "Mobile".
These constants are defined in SolutionMetaData class.

Returns

Supported Clients

SmartClient,WebClient,NGClient,MobileClient

Sample

 

styleSheet

The custom CSS used by the solution (a MEDIA lib entry). It can reference other media resources (even additional .css through relative '@import' statements).
For NGClient - this CSS will be available directly in the browser.

Returns

Supported Clients

NGClient

Sample

 

textOrientation

The direction that text is displayed.

Options include:
DEFAULT
left to right
right to left
locale specific

Returns

Supported Clients

SmartClient,WebClient,NGClient

Sample

 

titleText

The menu bar title of a solution.

Returns

Supported Clients

SmartClient,WebClient,NGClient

Sample

 

version

This is the version of the solution, this can be any kind of string but try to follow "Semantic Versioning".
This version is important when you are making modules that are distributed by the Servoy Package Manager.
Then this version is used to know what the developer has installed. This version should be in sync then with the webpackage.json file.

Returns

Supported Clients

SmartClient,WebClient,NGClient,MobileClient

Sample

 

Event Details

onAutoSaveFailed(recordMarkers)

The method that is executed when autosave results in validation or save failures.
This is not called for save or validate calls that are triggered from javascript itself (databaseManager.saveData()), only when Servoy tries an auto save
because of some event like user clicking on the form itself or foundset selection change.

Parameters

Object recordMarkers an array of all the record markers that failed to validate or save.

Supported Clients

SmartClient,WebClient,NGClient

Sample

 

onBeforeLogin(|)

The method that is to onOpen just that it executes before the login on solutions with a login form (not login soliution). The default is -none-.

Parameters

Object | String> queryParams all query parameters of the deeplink url with which the Client was started, key>string if there was one value else key>Array<String>

Supported Clients

SmartClient,WebClient,NGClient,MobileClient

Sample

 

onClose(force)

The method that is executed when a solution closes. The default is -none-.

Parameters

Boolean force if false then solution close can be stopped by returning false

Returns

Supported Clients

SmartClient,WebClient,NGClient

Sample

 

onDataBroadcast(dataSource, action, pks, cached)

Method that is executed when data broadcast occurs. The default is -none-.

Parameters

String dataSource table data source
Number action see SQL_ACTION_TYPES constants
JSDataSet pks affected primary keys
Boolean cached data was cached

Supported Clients

SmartClient,WebClient,NGClient

Sample

 

onError(ex)

The method that is executed when a solution opens and an error occurs. The default is -none.

Parameters

Object ex exception to handle

Returns

Supported Clients

SmartClient,WebClient,NGClient

Sample

 

onOpen(arg, |)

The method that is executed when a solution opens. The default is -none-.

Parameters

String arg startup argument part of the deeplink url with which the Client was started
Object | String> queryParams all query parameters of the deeplink url with which the Client was started, key>string if there was one value else key>Array<String>

Supported Clients

SmartClient,WebClient,NGClient,MobileClient

Sample

 

  • No labels

2 Comments

  1. Anonymous

    onDataBroadcast is not complete

    the sample code in Servoy says:

    function onDataBroadcast(dataSource, action, pks, cached)

    you could also add by action: DELETE_ACTION = 1; INSERT_ACTION = 2; UPDATE_ACTION = 3;

    1. Anonymous

      You can find the Action types under DatabaseManager > Constants > SQL_ACTION_TYPES.

      The reference to ACTIONS constant in the docs for the onDataBroadcast event will get updated in the next version.