Child pages
  • Specification (.spec file)

Versions Compared

Key

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

...

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

Supported tags are: scope, directEdit, addToElementsScope, addToElementsScope useAsCaptionInDeveloper + captionPriority and showInOutlineView


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

...

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).

 

showInOutlineView: boolean

...

.


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.

 

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:

Code Block
languagejs
title(...).spec
    (...)
    "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.

Default / Initial / Predefined values

...