Page History
...
Type | Description | ||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
boolean | Boolean value, either true or false | ||||||||||||||||||||||||||||||||||||||||||||
border | CSS border string representation | ||||||||||||||||||||||||||||||||||||||||||||
color | String color value
| ||||||||||||||||||||||||||||||||||||||||||||
dataprovider
| Reference to a dataprovider, either a record or scope/form variable. Can become a complex definition if it needs to support onDataChange, it needs to be able to send changes to server or display tags. The ondatachange handler will receive as parameter the old datarovider value, the new dataprovider value and a JSEvent. Starting with 2021.06 release the JSEvent.data will contain an object: {dataprovider : dataProviderID, scope : dataproviderScope, scopeid : variable_scope_or_datasource}.
Starting with 8.4, if 'forFoundset' above is used, then the client-side (in browser) value also provides two methods: addChangeListener / removeChangeListener. So you can add a listener that will receive updates (row insert/delete/change or full viewport update) similar to how the change listener in foundset property type works. Remember to always remove any added change listeners when the component's $scope is destroyed - similar to what is described in the link for the foundset property type listener. In order for dataprovider typed properties to 'push' their value changes to the server (so changes in the browser to end up in records or scope/form variables) you must either use autoApply or directly apply / startEdit. If you do not 'apply' (auto or manually) the change, the updates will not be sent to server.
Simple example of read-only dataprovider:
Simple example of read-write dataprovider (with auto-apply):
In server-side (solution) scripting, accessing a dataprovider property - for example "elements.myField.myDataprovider" - will yield a string: the dataprovider id (name of variable/column). You can also assign a dataprovider id (string) to that property. | ||||||||||||||||||||||||||||||||||||||||||||
dataset | JSDataSet type equivalent. Currently can be used only for runtime api or model (to send a dataset to client).
The type can have two configuration properties: 1. includeColumnNames , default false, will also send the column names as a separate array to client as the first row 2. columnTypes can specify some column types which will be used for converting the value to send client side, this is needed for non basic columns/types | ||||||||||||||||||||||||||||||||||||||||||||
date | Date value | ||||||||||||||||||||||||||||||||||||||||||||
dimension | Dimension representation
| ||||||||||||||||||||||||||||||||||||||||||||
double | A floating point number | ||||||||||||||||||||||||||||||||||||||||||||
font | CSS font string | ||||||||||||||||||||||||||||||||||||||||||||
form | URL string pointing to a form (like tab in tabpanel) | ||||||||||||||||||||||||||||||||||||||||||||
format | Format string. Given an object in the .spec file - to be able to specify which dataprovider and/or valuelist property to map this format property on. The 'for' value can be one property name (pointing to a dataprovider-type property or a valuelist property), but it can also contain an array of 2 properties (one being a dataprovider-type property and the other a valuelist property). It needs the 'for' clause to be able to deduct the type of the format (format depends on DP type, whether or not the valuelist has real/display values or not, ...). If you put a valuelist property in the "for" and that valuelist property has itself a "for" that points to a dataprovider property (that might be linked to a foundset or not) then you must add that same dataprovider property to the "for" clause of the format property as well.
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 . | ||||||||||||||||||||||||||||||||||||||||||||
function | Callback function information that can be called on server from client. in the component spec
in the component js implementation we use that executeInlineScript function that is exposed on the window object
Note that the component need to have reference to the "$window" service, and the "formname" and ''script" values are already encrypted in the model, and you need to use those values, and not plain text values for formname and script. Arguments for the callback can be set using the last parameter of "$window.executeInlineScript" | ||||||||||||||||||||||||||||||||||||||||||||
int | An integer number | ||||||||||||||||||||||||||||||||||||||||||||
insets | Padding insets representation
| ||||||||||||||||||||||||||||||||||||||||||||
JSEvent | type only used in handler call that go from client to server, see Specification (.spec file) - Servoy 2020 Documentation - Servoy Wiki | ||||||||||||||||||||||||||||||||||||||||||||
labelfor | Type for labelfor property of the label. | ||||||||||||||||||||||||||||||||||||||||||||
map | 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 only supports primitive values; do not try nesting other objects/arrays/maps in it's values. | ||||||||||||||||||||||||||||||||||||||||||||
media | Reference to a Media entry. Media can be specified in different ways (media name, media uuid, media url - for example "media:///servoy.jpg" -, media id). | ||||||||||||||||||||||||||||||||||||||||||||
record | Reference to a Record. You can use this type:
| ||||||||||||||||||||||||||||||||||||||||||||
relation | Reference to a Relation (this is a string, so if used as a api parameter, this would just mean the relation name) | ||||||||||||||||||||||||||||||||||||||||||||
runtimecomponent | The type of component (so that components can be passed as parameters) | ||||||||||||||||||||||||||||||||||||||||||||
protected | boolean security property, can be used to protect the entire component or specific properties or handlers in the component. For more information about 'protected' property type see this page. Configuration:
| ||||||||||||||||||||||||||||||||||||||||||||
point | Point representation
| ||||||||||||||||||||||||||||||||||||||||||||
object | 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). | ||||||||||||||||||||||||||||||||||||||||||||
scrollbars | An integer value which represents scrollbar definition. This type is used for designer to display special editor. | ||||||||||||||||||||||||||||||||||||||||||||
string | Plain string property. I18n keys will be resolved by default. | ||||||||||||||||||||||||||||||||||||||||||||
styleclass | String with space separated CSS classnames.Possible values supported by the component can be specified as hint for the developer
In Servoy version below 8.3 if you name the property "styleClass" that has the "styleclass" type also element.addStyleClass and element.removeStyleClass will work and will add or remove style classes from that property. With 8.3 this still works but you can mark any styleclass property type to be the "mainStyleClass" by adding the tag 'mainStyleClass' and set the value to true for this property:
| ||||||||||||||||||||||||||||||||||||||||||||
tabseq | Tab sequence integer value. See sablo-tabseq | ||||||||||||||||||||||||||||||||||||||||||||
tagstring | String property that can contain %%tags%%, be an i18n key or <html>. It can also be a simple static string. Examples:
Here is how this type of property can be configured in the component's .spec file:
or simply (to use default config values):
Starting with 8.4, if 'forFoundset' above is used, then the client-side (in browser) value also provides two methods: addChangeListener / removeChangeListener. So you can add a listener that will receive updates (row insert/delete/change or full viewport update) similar to how the change listener in foundset property type works. Remember to always remove any added change listeners when the component's $scope is destroyed - similar to what is described in the link for the foundset property type listener. | ||||||||||||||||||||||||||||||||||||||||||||
clientfunction
| This property must be used in NG2 if the value of the property represents a javacript function that must be run client side. In NG1 this was mostly just a (tag)string property type, but for ng2 we must know that it is meant to be a client side javascript function. For NG1 it works the same as a tagstring property type. But for NG2 it is handled differently so the component can get a function directly from the model instead of getting a string and do an eval(string) on it to generate the function. This is because in NG2 it is not allowed to do eval in the browser by default, Content Security Policy doesn't allow that for security reasons. | ||||||||||||||||||||||||||||||||||||||||||||
titlestring | 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. Configuration:
| ||||||||||||||||||||||||||||||||||||||||||||
valuelist | Reference to a ValueList. Supported configuration (in .spec file, next to the type of the property)
Valuelist property access from solution scripting will give the valuelist name. Assignment to a 'valuelist' typed property allows two types of values:
For example:
NOTE: From 2022.09 on the valuelist property type at runtime did change a bit. Now it is more a complex object that has currently 2 properties: name: to get the current name of the valuelist or to set it and then the valuelist of the given name is put in that property dataset: this will return the dataset of the current values, or set the current values if it was a CustomValueList. Client side, the valuelist will be an array of objects (items), each item will have two properties: "realValue" and "displayValue". If Valuelist is defined only having display values, realValue client side will be the same as display value:
Client side, valuelist also has some API that can be used: filterList and getDisplayValue. Filter list api takes a filter parameter and applies it to valuelist server side, then filtered valuelist will be sent to client (in same property). This is used for typeahead component:
Get display value API is used to retrieve a display value taking real value as parameter from server. This is needed in cases where valuelist has many items and we don't send all items client side for performance reasons (see max property, also settings server side).
Both functions return a promise that will be resolved when response comes from server, will receive as parameter the new filtered valuelist (beware also valuelist from model will be filtered) respectively the display value. | ||||||||||||||||||||||||||||||||||||||||||||
visible | 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. For more information about 'visible' property type see this page.
| ||||||||||||||||||||||||||||||||||||||||||||
foundset | Used to interact with server-side foundset from the browser (component properties can have this type). See Foundset property type. | ||||||||||||||||||||||||||||||||||||||||||||
foundsetRef | Can be used to send a 'reference' to a server side foundset to the client. Useful mostly in handlers or server-side-API-calls as argument type or return type. If server-side scripting returns/gives a foundset to such a type, browser side scripting will receive an unique foundsetId/reference to that foundset. Browser/client side scripting can later send that id back to server-side scripting and it will automatically be transformed into the original foundset object by this property type. See also Foundset property type - Combining Foundset Property Type, Foundset Reference Type, Record type and client-to-server scripting calls. So the foundset that you want to pass a reference to should already be in the model on the client to send the reference back to the server. Its not use to use this as a foundset reference with a Server to Client call if you want to pass on the foundset as an api argument. | ||||||||||||||||||||||||||||||||||||||||||||
rowRef | Starting from Servoy 8.3, 'record' type should be used instead. See 'record' type above. DEPRECATED: (to be used only in 8.2) Also known as "Record Finder type". Can be used to send a rowId (from a foundset type property's viewport) from browser scripting to server side scripting. The property type will return a 'finder' function. When you call that function with the foundset as an argument it will return the record that corresponds to that rowId from the client. See Foundset property type - Combining Foundset Property Type, Foundset Reference Type, Record type and client-to-server scripting calls for and example of how it can be used. |
...