UICONSTANTS

Constants Summarized

Constants Detailed

CALENDAR_NG_SHOW_ISO_WEEK_NUMBER

Property that can be set using application.putClientProperty(), preferably in solution onOpen handler (or anyway before forms containing calendars are shown).

If set to true, the default calendar, bootstrap calendar, bootstrap inline calendar and nggrid calendar will show week number according to ISO 8601. Other 3rd party (calendar) components are free to take this value into consideration as they please. By default (false) those will show week number according to locale.

The value can be true/false DEFAULT: false NOTE: In Titanium Client this value is by default true and currently cannot be changed.

Type String

Sample

application.putClientProperty(UICONSTANTS.CALENDAR_NG_SHOW_ISO_WEEK_NUMBER, true)

COMBOBOX_ENABLE_FILTER

Property that can be set using application.putClientProperty(). It is used only in NGClient (not in Titanium Client).

This is a global setting, it will affect all COMBOBOX fields. It must be set as soon as possible, ie. on solution open. Value can be true/false/null.

If set to false, ALL COMBOBOXes will hide the search box when gaining focus. DEFAULT: null.

Type String

Sample

// make all COMBOBOX fields hide the search box when gaining focus
application.putClientProperty(UICONSTANTS.COMBOBOX_ENABLE_FILTER, false);

COMBOBOX_SHOW_POPUP_ON_FOCUS_GAIN

Property that can be set using application.putClientProperty() or element.putClientProperty(). It is used only in Smart Client and Titanium Client.

If set on application it will affect all COMBOBOX fields. If set on an element it will affect only that COMBOBOX element/field (with priority over the application property). Value can be true/false/null.

If set to true, the affected COMBOBOX will show the pop-up when gaining focus (either from user input or API). DEFAULT: true for Smart Client and false for Titanium Client (to be more compatible with NGClient).

Type String

Sample

// make all COMBOBOX fields not show the pop-up when gaining focus
application.putClientProperty(UICONSTANTS.COMBOBOX_SHOW_POPUP_ON_FOCUS_GAIN, false);
// make one COMBOBOX field show the pop-up when gaining focus - overrides the application property set
forms.someForm.elements.comboboxElement.putClientProperty(UICONSTANTS.COMBOBOX_SHOW_POPUP_ON_FOCUS_GAIN, true);

DEFAULT_FORM_USE_MIN_HEIGHT

Sets the default value (true/false) that should be used when showing a form in a container. Default this is true when the forms useMinHeight property is unset, that means the css minHeight is set for this form at runtime.

You can set the default value to false for all forms that don't have that property set, so that no minHeigth is generated for those forms.

The value can be true/false DEFAULT: true

Type String

Sample

application.putClientProperty(UICONSTANTS.DEFAULT_FORM_USE_MIN_HEIGHT, false)

DEFAULT_FORM_USE_MIN_WIDTH

Sets the default value (true/false) that should be used when showing a form in a container. Default this is true when the forms useMinWidth property is unset, that means the css minWidth is set for this form at runtime.

You can set the default value to false for all forms that don't have that property set, so that no minWidth is generated for those forms.

The value can be true/false DEFAULT: true

Type String

Sample

application.putClientProperty(UICONSTANTS.DEFAULT_FORM_USE_MIN_WIDTH, false)

HTML_EDITOR_CONFIGURATION

Property that can be set on editable html area using element.putClientProperty()

The value must be a valid json string according to TinyMCE editor configuration (http://www.tinymce.com/wiki.php/configuration). It will be used to override/set configuration properties in order to customize the editor.

Type String

Sample

// adding a new TinyMCE plugin (same for skin or theme)
// this code assumes plugin.min.js was copied in web server at specified path
// NOTE: we use external plugin, not plugin, in order for file to be accessible from web server; for this example, pluging.min.js file must be copied under ServoyInstall/application_server/server/webapps/ROOT/tinymce/plugins/link
element.putClientProperty(UICONSTANTS.HTML_EDITOR_CONFIGURATION, '{"external_plugins": { "link": "../../../tinymce/plugins/link/plugin.min.js"}}')

// change the editor configuration (add menubar, status bar and change toolbar)
element.putClientProperty(UICONSTANTS.HTML_EDITOR_CONFIGURATION, '{"menubar": "tools table format view insert edit", "statusbar" : true, "toolbar": "undo redo | styleselect | bold italic"}')

LEAVE_FIELDS_READONLY_IN_FIND_MODE

Property that can be set using application.putClientProperty().

If set to true, fields that are read-only won't be editable in find mode If set to false, fields that are read-only will be editable in find mode

The value can be true/false DEFAULT: false

Type String

Sample

application.putClientProperty(UICONSTANTS.LEAVE_FIELDS_READONLY_IN_FIND_MODE, true)

LISTFORMCOMPONENT_PAGING_MODE

Property that can be set using application.putClientProperty(). This property only works in Titanium. Property should be set onSolutionOpen or onLoad of the form (before form is shown in client). If set to true, the listformcomponent will use the old paging mode for display.

The value can be true/false DEFAULT: false

Type String

Sample

application.putClientProperty(UICONSTANTS.LISTFORMCOMPONENT_PAGING_MODE, true)

NG_BLOCK_DUPLICATE_EVENTS

Property that can be set using application.putClientProperty() or element.putClientProperty()..

If set to true, any events of same type and on same component will be blocked (cancelled) until first event is finished.

The value can be true/false DEFAULT: false

Type String

Sample

application.putClientProperty(UICONSTANTS.NG_BLOCK_DUPLICATE_EVENTS, true)

Property that can be set using element.putClientProperty() If set to true, related find/search will only return records that have a related match, also in case of left outer joins. Otherwise a related search on a field may return records where the related search does not match. For example, *

    if (foundset.find()) {
     founset.myleftouterjoinrelation.myfield = 'someval';
     foundset.search();
    }

With this setting to false records of the foundset table that have no related records via the relation will also be returned. The value can be true/false DEFAULT: servoy property servoy.client.relatedNullSearchAddPkCondition/true

Type String

Sample

application.putClientProperty(UICONSTANTS.RELATED_NULL_SEARCH_ADD_PK_CONDITION, false)

TABLEVIEW_NG_OPTIMIZED_READONLY_MODE

Property that can be set using application.putClientProperty(). This property only works in NGClient (not in Titanium).

If set to true, the tableview will be seens as fully readonly and NGClient will generate an optimized version (textfields are replaced)

The value can be true/false DEFAULT: false

Type String

Sample

application.putClientProperty(UICONSTANTS.TABLEVIEW_NG_OPTIMIZED_READONLY_MODE, true)

TABLEVIEW_NG_PAGE_SIZE_FACTOR

Property that can be set using application.putClientProperty(). This property only works in NGClient (not in Titanium).

A number that defines the factor of what the next page size should be is in the tableview/listview/portal, this value is used to get the initial size (numerOfVisibleRows * thisPageSize). So a value of 2 (default) will load in 20 records if the number of visible rows is 10. Then if you scroll down the new set of records will be: (numberOfVisibleRows * thisPageSize) - numerOfVisibleRows so that will load for the default value 2, 1 page which is the number of visible rows (10 in this example).

The value can be any number but it should be bigger then 1.

WARNING the bigger the number, the more data is pushed initially to the client (and more is pushed in every new page)

DEFAULT: 2

Type String

Sample

application.putClientProperty(UICONSTANTS.TABLEVIEW_NG_PAGE_SIZE_FACTOR, 3)

TOOLTIP_DISMISS_DELAY

Property that can be set using application.putClientProperty() and indicates the delay in milliseconds after the tooltip is dismissed.

Type String

Sample

application.putClientProperty(UICONSTANTS.TOOLTIP_DISMISS_DELAY, 4000)

TOOLTIP_INITIAL_DELAY

Property that can be set using application.putClientProperty() and indicates the delay in milliseconds before the tooltip is shown.

Type String

Sample

application.putClientProperty(UICONSTANTS.TOOLTIP_INITIAL_DELAY, 2000)

TRUST_DATA_AS_HTML

Property that can be set using element.putClientProperty() or application.putClientProperty() If set to true, data showed on elements like buttons or labels will not be sanitized. Showing unsanitized data can make the system vulnerable to XSS attacks, for example, an user registers with name 'John Doe<script>someEvilJavascript</script>', when this data is shown in a label (by another user) the javascript in the script tags will be executed. Only enable this setting if the data shown can always be trusted and is never composed of data from an external system or user. The value can be true/false DEFAULT: false

Type String

Sample

element.putClientProperty(UICONSTANTS.TRUST_DATA_AS_HTML, true)

TYPE_AHEAD_SHOW_POPUP_ON_FOCUS_GAIN

Property that can be set using application.putClientProperty() or element.putClientProperty().

If set on application it will affect all TYPE-AHEAD fields. If set on an element it will affect only that TYPE-AHEAD element/field (with priority over the application property). Value can be true/false/null.

If set to true, the affected TYPE_AHEAD(s) will show the pop-up when gaining focus. DEFAULT: true.

Type String

Sample

// make all TYPE-AHEAD fields not show the pop-up when gaining focus
application.putClientProperty(UICONSTANTS.TYPE_AHEAD_SHOW_POPUP_ON_FOCUS_GAIN, false);
// make one TYPE-AHEAD field show the pop-up when gaining focus - overrides the application property set
forms.someForm.elements.typeAheadElement.putClientProperty(UICONSTANTS.TYPE_AHEAD_SHOW_POPUP_ON_FOCUS_GAIN, true);

VALUELIST_MAX_ROWS

Property that can be set using application.putClientProperty()

The value can be a positive integer representing the maximum number of rows that will be retrieved by query in database or related valuelist. Can have a maximum value of 1000.

DEFAULT: 500

Type String

Sample

application.putClientProperty(UICONSTANTS.VALUELIST_MAX_ROWS, 1000)

Last updated