Property Types for components / services
Last updated
Last updated
This version of the Property Types (for components and services) page is meant for developers who use components / services in their Servoy solutions. For an advanced version, that details how these types can be used when creating custom components / services, see this page instead.
Boolean value, either true or false
CSS border string representation
This property type must be used in Titanium if the value of the property represents a javacript function that has to run client side. In NG1 (tag)string property type was used for this purpose, but for Titanium NG Client we must know when it is meant to be a client side javascript function rather then a simple string (due to Content Security Policy - security reasons). It is still a string at design time in both cases.
Starting with version 2023.09, it is supported to use clientfunction(s) in the designer (input is still a simple string input) not just in properties typed that way in the component but also inside pure map or json property type values - but only if the component/service typed that sub-property/key correctly.
If, for a 'map' or 'json' typed value, the component/service did not type the sub-property correctly, but you still need to add that client side function to it - or if the component just uses a plain 'object' type where you need that client side function - then that can be done correctly in Titanium through the solution's code, by creating a client side BrowserFunction explicitly where you need it; see clientutils.generateBrowserFunction(...)
String color value
Example:
Reference to a dataprovider, either a record or scope/form variable.
Changing a dataprovider will trigger onDataChange event.
JSDataSet type equivalent. Currently can be used only for runtime api or model (to send a dataset to client).
Date value
Dimension representation
Example
A floating point number
This property is for handling the find mode for a component (if the component needs to react specific to findmode, like no formatting, allowing any kind of input)
CSS font string
URL string pointing to a form (like tab in tabpanel)
Format string.
Format property access from solution scripting will give the string value of the parsed format** . Assignment** to a 'format' typed property allows you to set a new format string.
Represents a foundset. Used to interact with a server-side foundset from the browser (component properties can have this type). Accessible (if the component allows it) in server-side solution scripting and in properties view - when designing forms as well.
(starting with Servoy 2024.12)
It can be used in components together with / for the "foundset" type above. It is meant as an optimization for paging components (that show only a fixed number of records on each "page") - and it represents the desired number of records to show per page initially. The component can decide to react to runtime changes of this property as well.
It's value is an integer. If the value is > 0, the foundset property's "preferredViewportSize" will be initialized with this value and "centerViewportOnSelected" will be set to false (paging mode). It is an optimization, so that on initial show of that component only this number of records is sent over from the server. (if this property is set to 10, only 10 records will be sent initially, instead of the default, which could be higher or lower)
A reference to a server side foundset. Can be used in handlers (or for internal implementation details by custom component creators).
Callback function / function information that can be called on server from client.
Padding insets representation
Example
An integer number
Type used in handlers that offers context information for the event.
Type for labelfor property of the label.
A map of key/value pairs. It's main purpose is converting string values, like "true"/"false" to boolean types, numbers as strings to number types (useful when using developer's properties view to assign values), and supporting i18n tags as values. It mostly supports primitive values, it does support nested structures since Servoy 2023.09 in the designer but only if those specific keys are marked like that through the "tags" spec attribute adding there an "value_types" entry, this is also needed to mark certain keys as clientfunction, for more full support of pure json with fully nested structurs look at the json property type
currently value_types can only have "map" or "json" as nested structures and "clientfunction" as the special value type that needs to be process specially.
This is like a map property type it has the same runtime behavior but it is more relaxed in what you can type in the designer, because that is a free textfield for a complete json definition. The json property type also has basic support for typing through arrays then the value_types is mapping on the objects inside the array
Reference to a Media entry. Media can be given in different ways on server (media name, media uuid, media url - for example "media:///servoy.jpg" -, media id).
Generic JSON type. When using this type, you should pass primitive values or objects/array of primitive values and objects/arrays - because it will generally not be able to handle correctly other types of values (for example you cannot give a foundset or a border and expect them to work). You should use more specific types from this list whenever possible instead of this generic type. The 'object' type relies on standard JSON to transfer it's contents to the browser; it tries to use some default conversions to make the value be a JSON-valid value (but the safest way is for you to give only what JSON allows as value).
Point representation
Example
Boolean security property, can be used to protect the entire component or specific properties or handlers in the component.
A security property, that can be used for nested data providers (like columns of a grid) - where some columns have a "dataprovider property type" that can be edited but some columns should not be editable. The dataprovider that it targets is specified by the component.
This property is a string property, so any non-null string can be set - if you want the attached data provider to be editable. But if you set a null value, then the server will not allow a change for that data provider.
Reference to a Record, can be used to send a record between client and server.
Reference to a Relation (this is a string, so if used as a api parameter, this would just mean the relation name)
**DEPRECATED Record type should be used instead.
The type of component (so that components can be passed as parameters)
An integer value which represents scrollbar definition. This type is used for designer to display special editor.
Plain string property. I18n keys will be resolved by default.
String with space separated CSS classnames.Possible values supported by the component can be specified as hint for the developer
Tab sequence integer value.
String property that can optionally contain %%tags%%, html with links to media files or it can be an i18n key. It can also be a just a simple static string. It will be pre-processed before being provided to the web component, depending on the configuration options.
String property similar to tagstring, but with support to use as default value the title string form a table column. It has a setting key: "for", that contains the dataprovider property from where the table column would be determined.
Reference to a ValueList. See ValueList Object Model and ValueList Guide for more information about a valuelist.
Supported properties in the spec are:
Valuelist property access from solution scripting will give the valuelist name. Assignment to a 'valuelist' typed property allows two types of values:
if you assign a String to it that will be interpreted as a valuelist name - and the valuelist with the given name is put in that property
if that property already contains a custom valuelist and you assign a Dataset to it then it will alter the items of the custom valuelist for that property of that element only.
Sample
Can be used to configure a valuelist's behavior (where applicable - mostly for typeahead components). It was added in 2023.06. Properties that can be configured from Properties View (on a property of valuelistConfig type):
Boolean security property, when set to false the component is protected from client data changes and function calls, data changes from the server are not sent to the client.
Name | Summary | Example |
---|---|---|
Name | Summary |
---|---|
lazyLoading
Setting for Global Method Valuelists only (does not affect any other type of valuelist); it helps not load values on initial display (if not needed), but only when they are really needed. "Lazy loading" must be set on the Valuelist - in the Valuelist Editor as well, otherwise it has no effect. Default and bootstrap typeahead components have this configuration set to true (default is false).
"lazyLoading": true
max
Allows limiting the number of items the valuelist will send to the browser.
"max": 500
for
Allows you to provide a dataprovider-type property name (that this valuelist property will use to determine for example the type of the data - this is needed for some types of valuelist like custom valuelist)
"for": "myDPProperty"
forFoundset
Allows you to specify that this valuelist can contain different values for each record of a foundset property (for example if you have a valuelist based on a relation).
"forFoundset": "myFoundset"
filterType
Configures if filtering in the valuelist is done using startsWith or contains function.
filterDestination
Configures if filtering in the valuelist is done using display value only or both display and real value.
allowNewEntries
Configures if you can add new entries in the valuelist from UI Component (this is possible only when the valuelist display and real value are the same; currently, no UI component can add a different real value to a valuelist that has separate display and real values)
boolean
border
clientfunction
color
dataprovider
dataset
date
dimension
double
font
form
format
foundset
foundsetInitialPageSize
foundsetRef
function
insets
int
JSEvent
labelfor
map
media
modifiable
object
point
protected
record
relation
rowRef
runtimecomponent
scrollbars
string
styleclass
tabseq
tagstring
titlestring
valuelist
valuelistConfig
visible