Page History
Not all property types are really meant for usage as api parameters, some of them are really meant for model property types only like:
dataprovider, tagstring (normal string will translate i18n, tags can't be resolved through api), media and valuelist (create a dataset out of a valuelist and with application.getValueListitems
Provided property value types
...
Type | Description | ||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
boolean | Boolean value, either true or false | ||||||||||||||||||||||||||||||||||||||||||||
border | CSS border string representation | ||||||||||||||||||||||||||||||||||||||||||||
byte | A number, 8 bit unsigned | ||||||||||||||||||||||||||||||||||||||||||||
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.
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):
| ||||||||||||||||||||||||||||||||||||||||||||
dataset | JSDataSet type equivalent. Currently can be used only for runtime api or model (to send a dataset to client).
The type cam 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 | ||||||||||||||||||||||||||||||||||||||||||||
float | 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
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
| ||||||||||||||||||||||||||||||||||||||||||||
labelfor | Type for labelfor property of the label. | ||||||||||||||||||||||||||||||||||||||||||||
long | A number, size is twice an integer | ||||||||||||||||||||||||||||||||||||||||||||
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). | ||||||||||||||||||||||||||||||||||||||||||||
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 type. When using this type, you should pass primitive types or object of primitive types because conversions are not available for more complex types. You use the specific type whenever possible instead of this generic type. This relies on JSON to transfer, so for example Dates should be send as the number value (the times in milis) instead of trying to send the Date as a date object itself. | ||||||||||||||||||||||||||||||||||||||||||||
scrollbars | An integer value which represents scrollbar definition. This type is used for designer to display special editor. | ||||||||||||||||||||||||||||||||||||||||||||
short | A number, 16 bit | ||||||||||||||||||||||||||||||||||||||||||||
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
| ||||||||||||||||||||||||||||||||||||||||||||
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):
| ||||||||||||||||||||||||||||||||||||||||||||
valuelist | Reference to a ValueList. Configuration (.spec file)
Valuelist property access from solution scripting will give the valuelist name. Assignment to a 'valuelist' typed property allows two types of values
For example:
| ||||||||||||||||||||||||||||||||||||||||||||
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. See Foundset property type. | ||||||||||||||||||||||||||||||||||||||||||||
foundsetRef | Can be used to send a 'reference' to a server side foundset to the server. If server-side scripting returns/sets a foundset to such a type, browser side scripting will receive an unique id/reference to that foundset. Browser side scripting can then send that id back to server-side scripting and it will automatically be transformed into the original foundset object by this property type. See Foundset property type - Combining Foundset Property Type, Foundset Reference Type, Record Finder type and client-to-server scripting calls for and example of how it can be used. | ||||||||||||||||||||||||||||||||||||||||||||
rowRef | 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 Finder type and client-to-server scripting calls for and example of how it can be used. |
...