Properties can be configured with special tags that may be interpreted by the deployment and/or development environment.

Supported tags are:

Tags' Details


Restricts the model property to: 'design', 'runtime' or 'private'.

Design means property can only be assigned from designer (not from scripting). Runtime means the property cannot be assigned from designer (will be hidden in Properties View). Private is an internal property, that should only be used by component itself (so component.js or component_server.js). Will not show in Properties View and cannot be assigned from scripting.

doc: string

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

For component type, specify whether component should be added to elements scope. Default is false, so component can be accessed only via component property. If true, will be accessible like any other element of the form.

logWhenOverMax: boolean

For the valuelist property type. If set to false, no logging will be done when only sending "max" number of items to the browser even though the valuelist does contain more than "max" items. Default is true.

allowaccess: string or array of strings

This tag can define if an edit (sent from browser to server) of this property is allowed even if properties such as "visible" or "enabled" (of the component or parent form) are false. By default, if the visibility of a component or its parent form is false, Servoy doesn't allow the modification (coming from browser) of any other property (it blocks it and logs it on server). With this tag you can say for a property that changing it should be allowed even in these situations; for example on "size" property you could say: I allow it for "visible"; or for both: ["visible", "enable"]

directEdit: boolean

One property of a component can be tagged as directEdit for designer, this way that property can be edited directly by double clicking the component (for example text property on label/button).

useAsCaptionInDeveloper : boolean and captionPriority : integer (> 0) (starting with Servoy 8.3)

Can be used to provide a caption for Custom Object Types in developer based on the value of a subproperty. For example if you create a table component that defines in .spec custom object types (that could also be "droppable" in developer) for columns, you might want to show as caption in developer for each such 'column' the header text subproperty value or - if that is not set - the dataprovider subproperty value. The captionPriority tag will allow you to specify in which order subproperties are checked for non-empty string values for the caption. That caption text ends up visible in places such as the outline view or in form designer for each column. You would specify it like this:


    "model": {
        "columns": { "type": "column[]", "droppable": true, (...) },
     "types": {
        "column": {
            "dataprovider": { "type": "dataprovider",
                              "tags": { "useAsCaptionInDeveloper" : true,
                                        "captionPriority" : 2 }, (...) },
            "headerText": { "type": "tagstring",
                            "tags": { "useAsCaptionInDeveloper" : true,
                                      "captionPriority" : 1 }},

showInOutlineView: boolean (for Servoy < 8.3)

In the Outline View, Custom Type objects have the name of the type as lables. The showInOutlineView:true tag can be added to any property definition in order to append the design time value of that property to the label of the custom type object in the Outline View. If you are using Servoy >= 8.3 please use "useAsCaptionInDeveloper " and "captionPriority" instead. Starting with that version "showInOutlineView" : true is equivalent to "useAsCaptionInDeveloper" : true.

main: boolean (starting with Servoy 8.4)

Used only for dataprovider types. In case there are more then one dataprovider types, setting this tag to 'true' will define the main dataprovider, that is needed on different places, like sorting. As an example, having a component with 2 dataprovider properties, and using it in a table view, that component is used for column rendering, and calling sort on that column, by clicking on the column header, will need the dataprovider from the component to do the sort - using the 'main' tag, we can define the dataprovider to use. (see onrenderlabel component from servoy-extra package)

mode: string (starting with Servoy 2019.03) - Restricts the model property to: 'combobox' or 'typeahead' in developer properties view. (Default is combobox)

This can be used only on string properties when they have "values" attribute. Setting mode to typeahead will create a typeahead property in property editor. Setting mode to combobox or skipping mode property will create a combobox in property editor.

"someTextProperties": { "type": "string",
                        "tags": { "scope": "design", "mode": "typeahead" },
                        "values": [ "off", "shipping", "billing", "phone", "address"]

Last updated