Child pages
  • Specification (.spec file)

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Reverted from v. 132

...

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

...

Code Block
languagejs
titleExample enabled
"model": {
   "enabled": { "type": "enabled", "blockingOn": false, "blockingChanges": true , "default": true }
} 

It is important to use type enabled  if we want the value from the parent container (i.e. form, portal) to be pushed to the component. For instance if a portal is disabled, then all the components from the portal which have a property of type enabled will also be disabled.
If you still want to allow changes on the component's properties and/or allow handler calls despite having protection on by enabled, you can set the blockingChanges property to false

Readonly/Findmode
Anchor
ReadonlyFindmode
ReadonlyFindmode

...

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

...

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.

...