Child pages
  • Specification (.spec file)

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Starting with 8.2 (before these were defined in "api") there is also the internalApi section that is better described in Server Side Scripting page (calls between client and server that are only meant for the code inside the component/service to use).

You can find an example .spec file below.

Grouping of library dependency options

...

doc: a string (can have some basic html tags in it) that describes what the property does to the developer. See Documenting what properties do for more details.


addToElementsScope : boolean

...

More information about how these properties work with containers can be found here.

Protecting properties
Anchor
Protecting
Protecting

...

You might also want to read about how protecting works with containers below.

Visibility properties
Anchor
Visibility
Visibility

...

You might also want to read about how visibility works with containers below.

Container security
Anchor
ContainerSec
ContainerSec

...

For information about documenting handlers see Documenting handlers and handler templates below. For information about documenting API functions see the documenting api functions example.

...

Code Block
"functionName": {
        "returns":  "string",
        "parameters": [
            { "name": "start", "type": "int" },
            { "name": "end", "type": "int" } 
        ],
		"private": true // since Servoy 8.3, optional, default is false,
		"ignoreNGBlockDuplicateEvents": true // since Servoy 2020.12, default is false
}

The "private" configuration makes the handler only accessible from Server Side Scripting, not from the client/browser itself.
The "ignoreNGBlockDuplicateEvents" configuration makes the handler ignore the system NG_BLOCK_DUPLICATE_EVENTS property.

Anchor
documentingHandlers
documentingHandlers
Documenting handlers and handler templates

...

For information about documenting properties see Documenting what properties do above,. For information about documenting API functions see the documenting api functions example.

...

Note
titleAbout calling browser-side api functions of components


When a component (not service) sync or simple async api function (see below) that the solution can call is implemented in browser-side component/service logic implementation ("definition" in .spec file), it is important to note that calling such a function when the form of that component is not already created in browser DOM will result in a temporary "force-load" of that form in a hidden div in the browser - just to be able to call that api function. As this is usually not useful and will slow-down the solution due to the hidden loading of a form, this situation should be avoided (either by the solution - calling the api call later after the form was shown - or, where possible, by using delay until form loads async api functions in components - see below).

Servoy will log warning messages each time a sync API call to browser executes when the browser doesn't have the needed form present in DOM yet (triggering a force-load of the form in a hidden div). Most of the times this happens when solutions call component sync api functions to browser inside the onShow handler of a form.

...