LSPS documentation logo
LSPS Documentation
Data Types

Forms

FormComponentABSTRACT

The base of all components. All Forms framework components must extend this class.

modelingIdDEPRECATED : String

Modeling id of the component. Do not use the field directly, use getModelingId and setModelingId methods instead.

data : Object

Arbitrary data which you can use for any purpose. This field is not used by the Forms framework itself.

includeConstraintViolation : {ConstraintViolation : Boolean}
excludeConstraintViolation : {ConstraintViolation : Boolean}
internalState : Object

A property used by the framework to store component state when saving document or todo. Do not use this property directly.

FormComponent() CONSTRUCTOR
_getAllErrors(custom : Boolean, data : Boolean, validators : Boolean) : List<String>
_getErrorsRecursive(custom : Boolean, data : Boolean, validators : Boolean) : Map<FormComponent, List<String>>
addMessageListener(listener : {MessageEvent : void}) : String
addStyleName(style : String) : void

Adds one or more style names to this component. Multiple styles can be specified as a space-separated list of style names. The style name will be rendered as a HTML class name, which can be used in a CSS definition.

Label label = new Label("This text has style");
label.addStyleName("mystyle");

Each style name will occur in two versions: one as specified and one that is prefixed with the style name of the component. For example, if you have a Button component and give it "mystyle" style, the component will have both "mystyle" and "v-button-mystyle" styles. You could then style the component either with:

.mystyle {font-style: italic;}

or

.v-button-mystyle {font-style: italic;}

This method will trigger a RepaintRequestEvent.

Parameters:

  • style the new style to be added to the component
addStyleSheet(sheet : String) : String

Generates new unique id and adds a new stylesheet with that id. The style sheet can be removed by removeStyleSheet(String id) method. It is also automatically removed when the component is detached from the page.

Parameters:

  • sheet - css sheet

Returns:

  • id - uniquely identifies the style sheet
addStyleSheet(id : String, sheet : String) : String

Adds a new stylesheet to the page or modifies existing stylesheet. The style sheet can be removed by removeStyleSheet(String id) method. It is removed when the component is detached from the page.

Parameters:

  • id - uniquely identifies the style sheet
  • sheet - css sheet

Returns:

  • id
call(method* : String, args : Object...) : Object

Calls a method on the underlying Java UI component. You can use this method e.g. for calling methods of component-produced objects on the component itself. For example, the Tab itself has utility methods which delegates to the TabSheet itself. Default implementation will first try to find given method reflectively on the FormComponent-based Java class; if there is no method with given name and given parameter count (parameter types are not matched), the underlying Vaadin widget is searched. If there is no such method, this method fails with an exception.

Parameters:

  • method the method name, not null.
  • args parameters

Returns:

  • optional method result, may be null. Note that LSPS will pass Decimal instead of Java's Integer here, so make sure you are not calling Vaadin Component methods directly with Decimals.
call(method* : String, args : List<Object>) : ObjectDEPRECATED

Calls a method on the underlying Java UI component.

DEPRECATED. Use call(String method, Object... args)

clearCustomErrorMessagesRecursive() : void
Clears custom error message in this component and in all its children.
createNative() : void
excludeConstraintViolation(violation : ConstraintViolation) : Boolean

Tells whether the 'excludeConstraintViolation' predicate evaluates the constraint violation as the one which should not be displayed on this component. When this predicate is not set then this method returns false.

Parameters:

  • violation the constraint violation to evaluate

Returns:

  • true if the predicate tells that the constraint violation should not be displayed on this component.
executeAfter(intervalMs : Decimal, closure : { : void}) : String

Turns on polling and executes the closure exactly once approximately after intervalMs. Returns unique id that can be used to stop the closure.

The closure is run only while the component is attached to the screen. It stops when component is detached.

Polling causes the browser to send request to server at regular interval. This allows ui to update visible information after each regular request. Note that frequent polling causes higher server load.

executeRepeatedly(intervalMs : Decimal, closure : { : void}) : String

Turns on polling and executes the closure approximately every intervalMs. Returns unique id that can be used to stop the closure.

The closure is run only while the component is attached to the screen. It stops when component is detached.

Polling causes the browser to send request to server at regular interval. This allows ui to update visible information after each regular request. Note that frequent polling causes higher server load.

getAllErrorMessages() : List<String>
Collects error, data and validation messages from this component.
getAllErrorMessagesRecursive() : Map<FormComponent, List<String>>
Collects error, data and validation messages from this component, all its children and their descendants.
getCaption() : String

Returns the current component caption. By default the component has no caption.

Returns:

  • caption, may be null.
getComponentAlignment() : Alignment

Returns the current Alignment of this component, with respect to its parent layout.

Parameters:

  • child the child component

Returns:

  • the alignment, not null.
getContextClickHandler() : {ContextClickEvent : void}

Gets the handler which is notified when a context click event occurs.

Returns:

  • the context click handler or null if none is installed.
getCustomErrorMessage() : String

Gets the component error message. Return value contains only custom component error message set by setErrorMessage method, it does NOT contain data constraint error messages nor validation error messages.

Returns:

  • the component error message or null
getCustomErrorMessageRecursive() : Map<FormComponent, List<String>>
Returns all custom error messages set to this component and to its child components. Returned list does NOT contain validation nor data error messages.
getDataErrorMessages() : List<String>

Returns all data error messages assigned to this component by data validation. Returned list does NOT contain validation error messages nor custom error message.

Data validation is typically performed via validate validation function, its results are distributed to components using clearConstraintErrorMessages function.

getDataErrorMessagesRecursive() : Map<FormComponent, List<String>>

Returns all data error messages assigned by data validation to this component and to its child components. Returned list does NOT contain validation error messages nor custom error message.

Data validation is typically performed via validate validation function, its results are distributed to components using clearConstraintErrorMessages function.

getDescription() : String

Gets the components description, used in tooltips and can be displayed directly in certain other components such as forms. The description can be used to briefly describe the state of the component to the user.

Returns:

  • component's description String
getExcludeConstraintViolation() : {ConstraintViolation : Boolean}

Gets the predicate which is used by this component to specify which constraint violation should not be displayed on this component.

Parameters:

  • the predicate
getExpandRatio() : Decimal

Returns the expand ratio of this component, with respect to its parent VerticalLayout or HorizontalLayout.

Warning: this method will fail if the component is not placed directly in the VerticalLayout or HorizontalLayout.

Returns:

  • expand ratio of given component, null by default.
getHeight() : String

Returns the component height, in the form of [number][units], such as 100%, 10em, 25px.

Returns:

  • the height of the component; null if the component wraps its contents. Most, if not all, components have default height of null.
getIcon() : Resource

Gets the icon resource of the component.

See #setIcon(Resource) for a detailed description of the icon.

Returns:

  • the icon resource of the component or null if the component has no icon
getIncludeConstraintViolation() : {ConstraintViolation : Boolean}

Gets the predicate which is used by this component to specify which constraint violation should be displayed on this component.

Returns:

  • the predicate
getModelingId() : String

Gets the modeling ID of this component. Note: if the component is rendered multiple times, the rendered id is different. Each copy gets unique suffix.

Returns:

  • the modeling ID
getStyleName() : String

Gets all user-defined CSS style names of a component. If the component has multiple style names defined, the return string is a space-separated list of style names. Built-in style names defined in Vaadin or GWT are not returned.

The style names are returned only in the basic form in which they were added; each user-defined style name shows as two CSS style class names in the rendered HTML: one as it was given and one prefixed with the component-specific style name. Only the former is returned.

Returns:

  • the style name or a space-separated list of user-defined style names of the component
getUniqueModelingId() : String

Gets html id of this component as rendered on the page.

Returns:

  • the modeling ID
getValidatorsMessages() : List<String>
Returns all validation errors produced by the validators attached to this component. If there are no validators or all of them pass, returns an empty list (never null). Only components with value can have validator, other components return an empty list. Returned list does NOT contain data error messages nor custom error message.
getValidatorsMessagesRecursive() : Map<FormComponent, List<String>>
Returns all errors from validators added to this component and to its children components. Only components with value can have validator attached. Returned list does NOT contain data error messages nor custom error message.
getWidth() : String

Returns the component width, in the form of [number][units], such as 100%, 10em, 25px.

Returns:

  • the width of the component; null if the component wraps its contents.
includeConstraintViolation(violation : ConstraintViolation) : Boolean

Tells whether the 'includeConstraintViolation' predicate evaluates the constraint violation as the one which should be displayed on this component. When this predicate is not set then this method returns false.

Parameters:

  • violation the constraint violation to evaluate

Returns:

  • true if the predicate tells that the constraint violation should be displayed on this component.
isEnabled() : Boolean

Tests whether the component is enabled or not. A user can not interact with disabled components. Disabled components are rendered in a style that indicates the status, usually in gray color. Children of a disabled component are also disabled. Components are enabled by default.

As a security feature, all updates for disabled components are blocked on the server-side.

Note that this method only returns the status of the component and does not take parents into account. Even though this method returns true the component can be disabled to the user if a parent is disabled.

Returns:

  • true if the component and its parent are enabled, false otherwise.
isReadOnly() : Boolean

Tests whether the component is in the read-only mode. The user can not change the value of a read-only component. As only ComponentWithValue components normally have a value that can be input or changed by the user, this is mostly relevant only to field components, though not restricted to them. Notice that the read-only mode only affects whether the user can change the value of the component; it is possible to, for example, scroll a read-only table.

Returns:

  • true if the component is read only.
isVisible() : Boolean

Returns true if the component is visible. All components are by default visible.

Returns:

  • true if the component is visible, false if not.
localize(message : String) : String
markAsDirty() : void
Marks that this component's state might have changed.
removeAllPollingClosures(id : String) : void
Removes all polling closures added by this component.
removeMessageListener(id : String) : String
removePollingClosure(id : String) : Boolean
Removes polling closure. If all the closures were removed, polling stops. Only closures that have been added into this component can be removed.
removeStyleName(style : String) : void

Removes one or more style names from component. Multiple styles can be specified as a space-separated list of style names.

The parameter must be a valid CSS style name. Only user-defined style names added with addStyleName() or setStyleName() can be removed; built-in style names defined in Vaadin or GWT can not be removed.

  • This method will trigger a RepaintRequestEvent.

Parameters:

  • style the style name or style names to be removed
removeStyleSheet(id : String) : void

Removes stylesheet identified by id from the page.

Parameters:

  • id - uniquely identifies the style sheet
setAppCloseListener(onUnload : { : void}) : void

Sets callback on "beforeunload" browser event. It is fired when:

  • the browser is about to closed,
  • the tab is about to closed,
  • user changed url in browser and is leaving the application entirely.
setCaption(caption : String) : void

Sets the component's caption. The caption itself is rendered by the parent layout.

Parameters:

  • caption the new caption, null for no caption.
setComponentAlignment(alignment* : Alignment) : void

Set alignment for this component in its parent layout. Use predefined alignments from Alignment enum.

Parameters:

  • child the component to align within it's layout cell.
  • alignment the Alignment value to be set
setContextClickHandler(handler : {ContextClickEvent : void}) : void
Sets a handler which is notified when a context click event occurs. Usually the handler configures the context menu items before the context menu is displayed.
setContextMenuItems(items : List<MenuItem>) : void

Sets the context menu items to this component.

Parameters:

  • items a list of context menu items
setCustomErrorMessage(errorMessage : String) : void

Sets custom error message to this component. If the error message is not null, the component is marked with a red asterisk. Custom component error message is shown first, above data constraint error messages and validation error messages.

Parameters:

  • errorMessage errorMessage the new error message or null
setDescription(description : String) : void

Sets the component's description. See #getDescription() for more information on what the description is. This method will trigger a RepaintRequestEvent.

The description is displayed as HTML in tooltips or directly in certain components so care should be taken to avoid creating the possibility for HTML injection and possibly XSS vulnerabilities.

Parameters:

  • description the new description string for the component.
setEnabled(enabled* : Boolean) : void

Enables or disables the component. The user can not interact with disabled components, which are shown with a style that indicates the status, usually shaded in light gray color. Components are enabled by default.

Button enabled = new Button("Enabled");
enabled.setEnabled(true); // The default
layout.addComponent(enabled);

Button disabled = new Button("Disabled");
disabled.setEnabled(false);
layout.addComponent(disabled);

This method will trigger a RepaintRequestEvent for the component and, if it is a ComponentContainer, for all its children recursively.

Parameters:

  • enabled a boolean value specifying if the component should be enabled or not
setExcludeConstraintViolation(predicate : {ConstraintViolation : Boolean}) : void

Sets a predicate shich allows to specify which constraint violation should not be displayed on this component.

Parameters:

  • predicate the predicate to set
setExpandRatio(ratio : Decimal) : void

This method is used to control how excess space in layout is distributed among components in the parent layout. Excess space may exist if layout is sized and contained non relatively sized components don't consume all available space.

Example how to distribute 1:3 (33%) for component1 and 2:3 (67%) for component2 :

layout.setExpandRatio(component1, 1);
layout.setExpandRatio(component2, 2);

If no ratios have been set, the excess space is distributed evenly among all components.

Note, that width or height (depending on orientation) needs to be defined for this method to have any effect.

Warning: this method will fail if the component is not placed directly in the VerticalLayout or HorizontalLayout.

Parameters:

  • ratio the ratio. If null or 0, the expanding is disabled for given child component.
setHeight(height : String) : void

Sets the component height, in the form of [number][units], such as 100%, 10em, 25px. Use null to direct the component to wrap its contents tightly.

Parameters:

  • height the new height, may be null.
setHeightFull() : void
Makes the component fill the parent vertically. A shorthand for calling setHeight("100%").
setHeightWrap() : void
Makes the component wrap its contents vertically. A shorthand for calling setHeight(null).
setIcon(resource : Resource) : void

Sets the icon of the component.

An icon is an explanatory graphical label accompanying a user interface component, usually shown above, left of, or inside the component. Icon is closely related to caption (see setCaption()) and is usually displayed horizontally before or after it, depending on the component and the containing layout.

The image is loaded by the browser from a resource, typically a ThemeResource.

The icon of a component is, by default, managed and displayed by the layout component or component container in which the component is placed. For example, the VerticalLayout component shows the icons left-aligned above the contained components, while the FormLayout component shows the icons on the left side of the vertically laid components, with the icons and their associated components left-aligned in their own columns.

An icon will be rendered inside an HTML element that has the v-icon CSS style class. The containing layout may enclose an icon and a caption inside elements related to the caption, such as v-caption .

Parameters:

  • icon the icon of the component. If null, no icon is shown and it does not normally take any space.
setIncludeConstraintViolation(predicate : {ConstraintViolation : Boolean}) : void

Sets a predicate which allows to specify which constraint violation should be displayed on this component.

Parameters:

  • predicate the predicate to set.
setModelingId(modelingId : String) : void

Sets the modeling ID of this component. Note: if the component is rendered multiple times, the rendered id might not exactly match configured id. Each html component copy gets unique suffix.

Parameters:

  • modelingId - modeling id to be set to component
setReadOnly(readOnly* : Boolean) : void

Sets the read-only mode of the component to the specified mode. The user can not change the value of a read-only component. As only ComponentWithValue components normally have a value that can be input or changed by the user, this is mostly relevant only to field components, though not restricted to them. Notice that the read-only mode only affects whether the user can change the value of the component; it is possible to, for example, scroll a read-only table.

Parameters:

  • readOnly true if the component should be read only.
setSizeFull() : void
Makes the component fill the parent. A shorthand for calling setWidthFull() and setHeightFull().
setStyleName(style : String) : void

Sets one or more user-defined style names of the component, replacing any previous user-defined styles. Multiple styles can be specified as a space-separated list of style names. The style names must be valid CSS class names and should not conflict with any built-in style names in Vaadin or GWT.

Label label = new Label("This text has a lot of style");
label.setStyleName("myonestyle myotherstyle");

Each style name will occur in two versions: one as specified and one that is prefixed with the style name of the component. For example, if you have a Button component and give it "mystyle" style, the component will have both "mystyle" and "v-button-mystyle" styles. You could then style the component either with:

.myonestyle {background: blue;}

or

.v-button-myonestyle {background: blue;}

It is normally a good practice to use addStyleName() rather than this setter, as different software abstraction layers can then add their own styles without accidentally removing those defined in other layers.

This method will trigger a RepaintRequestEvent.

Parameters:

  • style the new style or styles of the component as a space-separated list
setVisible(visible* : Boolean) : void

Changes the component visibility. Invisible component's HTML elements are not present in the browser's DOM tree.

Parameters:

  • visible true if the component should be visible, false if not.
setWidth(width : String) : void

Sets the component width, in the form of [number][units], such as 100%, 10em, 25px. Use null to direct the component to wrap its contents tightly.

Parameters:

  • width the new width, may be null.
setWidthFull() : void
Makes the component fill the parent horizontally. A shorthand for calling setWidth("100%").
setWidthWrap() : void
Makes the component wrap its contents horizontally. A shorthand for calling setWidth(null).
showContextMenu(x* : Integer, y* : Integer) : void

Opens context menu on this component.

Parameters:

  • x - screen coordinate where to put the menu on
  • y - screen coordinate where to put the menu on
toString() : String
Label extends ComponentWithValue

Shows the value; does not allow the value to be edited. Accepts Object and calls toString() on the object. If the value is null, nothing (empty string) is displayed. isValid() always returns true for this component. Does not support validators and is always valid.

Label() CONSTRUCTOR
Creates an empty label which initially shows nothing (null).
Label(value : Object) CONSTRUCTOR

Creates a label which initially shows given value.

Parameters:

  • value the value to show, may be null.
Label(value : Object, mode* : ContentMode) CONSTRUCTOR

Creates a label with a given value and content mode.

Parameters:

  • value the value to show, may be null.
getCaptionMode() : CaptionMode

Checks whether captions are rendered as HTML

The default is false, i.e. to render that caption as plain text.

Returns:

  • true if the captions are rendered as HTML, false if rendered as plain text
getContentMode() : ContentMode
Gets the content mode of the label.
setCaptionMode(captionMode* : CaptionMode) : void

Sets whether the caption is rendered as HTML or plain text.

When a caption is rendered as HTML, it is up to the developer to ensure that no harmful HTML can be used. If set to plain text, the caption is rendered in the browser as plain text.

The default is plain text.

Parameters:

  • captionMode caption mode
setContentMode(mode* : ContentMode) : void

Sets the content mode of the caption. Content mode defines how the label's content is rendered - as html or as text and whether new line is rendered as is or as tag.

Parameters:

  • mode the content mode to set
toString() : String
Binding

The user of this interface binds a component to a value which the component displays or edits.

It provides values either by holding them directly, wrapping them in a closure or a reference, or by other means.

get() : Object

Returns the value of the binding.

Returns:

  • binding value
getBinding() : RecordAndProperty

If the Binding value represents a writable reference to a record and its property, the function returns the RecordAndProperty object with the record and property. In other cases, for example, for a simple value or a closure, the return value is null. This method is used, for example, to infer validators with ComponentWithValue.inferValidator().

Returns:

  • null if the value does not reference a record and property
set(value : Object) : void

Sets the Binding to this value. Note that this operation may not be supported and fail.

Parameters:

  • value target Binding value
ComponentGroupABSTRACT extends FormComponent

A group of components. This component is valid if all child groups and child ComponentWithValues are valid.

addComponent(child* : FormComponent) : void

Adds component to this component group. Does nothing if the component is already a child of this component group.

Parameters:

  • child the component, not null.
addComponents(children* : Collection<FormComponent>) : void

Adds all components to this component group.

Parameters:

  • children the collection of children to add, not null, may be empty.
getComponentAt(i* : Integer) : FormComponent

Returns the i-th child of this group. Fails if the index is out-of-range.

Parameters:

  • i the child index, 0-based. Must be 0..getComponentCount()-1

Returns:

  • the i-th child component, not null.
getComponentCount() : Integer
Returns the number of child components present in this group.
getComponents() : List<FormComponent>

Returns the child components as a list.

Returns:

  • the list of all child components, not null, may be empty.
isConvertible() : BooleanDEPRECATED
Deprecated, returns the same thing as #isValid.
isMargin() : Boolean

Returns:

  • true if the group is margined, false if not. Always false for tab sheet.
isSpacing() : Boolean

Returns:

  • true if spacing between child components within this layout is enabled, false otherwise.
isValid() : Boolean
Checks if all child groups and child ComponentWithValues are valid. If any invalid child is found, returns false.
refresh() : void
Calls refresh() on all nested components with values.
removeAllComponents() : void
Removes all child components from this group, leaving it empty.
removeComponent(child* : FormComponent) : void

Removes given component from this group. Does nothing if the component is not a child of this component group.

Parameters:

  • child the component to remove, not null.
removeComponents(children* : Collection<FormComponent>) : void

Removes all given components from this group.

Parameters:

  • children the components to remove, not null, may be empty.
setComponentAlignment(children* : Collection<FormComponent>, alignment* : Alignment) : void

Set alignment for all given contained component in this layout. Use predefined alignments from Alignment enum.

Parameters:

  • children the components to align within it's layout cell.
  • alignment the Alignment value to be set
setMargin(margin* : Boolean) : void

Enable layout margins. Affects all four sides of the layout. This will tell the client-side implementation to leave extra space around the layout. The client-side implementation decides the actual amount, and it can vary between themes.

Does nothing for TabSheet.

Parameters:

  • enabled true if margins should be enabled on all sides, false to disable all margins
setSpacing(spacing* : Boolean) : void

Enable spacing between child components within this layout.

NOTE: This will only affect the space between components, not the space around all the components in the layout (i.e. do not confuse this with the cellspacing attribute of a HTML Table). Use #setMargin(boolean) to add space around the layout.

See the reference manual for more information about CSS rules for defining the amount of spacing to use.

TabSheet has no spacing support, therefore this method does nothing for tab sheet.

Parameters:

  • enabled true if spacing should be turned on, false if it should be turned off
toString() : String
VerticalLayout extends OrderedComponentGroup
VerticalLayout() CONSTRUCTOR
Creates an empty vertical layout initially containing no components.
VerticalLayout(children* : FormComponent...) CONSTRUCTOR

Creates a vertical layout initially containing given components.

Parameters:

  • children the child components, may be empty.
toString() : String
withMarginSpacing() : VerticalLayout

Sets both margin and spacing to true.

Returns:

  • this
HorizontalLayout extends OrderedComponentGroup
HorizontalLayout() CONSTRUCTOR
Creates an empty horizontal layout containing no components.
HorizontalLayout(children* : FormComponent...) CONSTRUCTOR

Creates a horizontal layout containing given components.

Parameters:

  • children the child components, may be empty.
toString() : String
FormLayout extends OrderedComponentGroup
FormLayout() CONSTRUCTOR
Creates an empty form layout initially containing no components.
FormLayout(children* : FormComponent...) CONSTRUCTOR

Creates a form layout initially containing given components.

Parameters:

  • children the child components, may be empty.
toString() : String
CheckBox extends InputComponentWithValue

Shows boolean values only. Always convertible.

CheckBox() CONSTRUCTOR
Creates a checkbox with no label and simple value holder.
CheckBox(caption : String) CONSTRUCTOR

Creates a checkbox with given label and simple value holder.

Parameters:

  • caption the caption
CheckBox(caption : String, binding* : Binding) CONSTRUCTOR

Creates a checkbox with given label and given property.

Parameters:

  • caption the caption
  • binding the binding, not null. Must hold Boolean value.
CheckBox(caption : String, ref* : Reference<Boolean>) CONSTRUCTOR

Creates a checkbox with given label, referencing given variable/field.

Parameters:

  • caption the caption
  • ref the reference not null.
getValue() : Boolean
setBinding(ref : Reference<Boolean>) : void

Sets the ReferenceValue being displayed by this component. By default a simple value with the initial value of null is displayed. The component is automatically refreshed. If the reference is null, previous reference is cleared and field is empty.

Parameters:

  • ref reference to the new value holder.
toString() : String
ComponentWithValueABSTRACT extends FormComponent

A component showing a value. The value is not yet editable - please use InputComponentWithValue for that. This component is primarily extended by components which only show some data, for example the Label component.

ComponentWithValue() CONSTRUCTOR
clearBinding() : void
Convenience method setBinding(null as Reference<Object>). Clears previous reference and field will end up empty.
getBinding() : Binding

Every component with value is bound to a data object. Gets the currently displayed Binding object.

Returns:

  • currently displayed Binding, never null.
getValidatorsMessages() : List<String>
getValue() : Object

Polls the current Binding for its data. Shorthand for getBinding().get()

Returns:

  • getBinding().get()
isConvertible() : BooleanDEPRECATED
Deprecated, returns the same thing as #isValid.
isValid() : Boolean
refresh() : void
Re-sets the property, causing the value to be re-read and re-displayed.
refreshBinding() : void
Refresh component binding.
setBinding(binding* : Binding) : void
Sets the Binding being displayed by this component. By default a simple value with the initial value of null is displayed. The component is automatically refreshed Parameters:
  • binding the new value holder.
setBinding(ref : Reference<Object>) : void

Sets the ReferenceValue being displayed by this component. By default a simple value with the initial value of null is displayed. The component is automatically refreshed. If the reference is null, previous reference is cleared and field is empty.

Parameters:

  • ref reference to the new value holder.
setValue(value : Object) : void
Sets given value to the currently bound Value. Shorthand for getProperty().set(). It also refreshes the binding.
toString() : String
TextField extends AbstractTextArea

Shows String values only. Always convertible.

TextField() CONSTRUCTOR
Creates a text field with no label and simple value holder.
TextField(caption : String) CONSTRUCTOR

Creates a text field with given label and simple value holder.

Parameters:

  • caption the caption
TextField(caption : String, binding* : Binding) CONSTRUCTOR

Creates a text field with given label and given binding.

Parameters:

  • caption the caption
  • binding the binding, not null.
TextField(caption : String, ref* : Reference<String>) CONSTRUCTOR

Creates a text field with given label, referencing given variable/field.

Parameters:

  • caption the caption
  • ref the reference not null.
toString() : String
DecimalField extends InputComponentWithValue

Shows Decimal values only. If the value typed by the user is not convertible to Decimal, isValid() returns false and the field shows error message.

DecimalField() CONSTRUCTOR
Creates a decimal field with no label and simple value holder.
DecimalField(caption : String) CONSTRUCTOR

Creates a decimal field with given label and simple value holder.

Parameters:

  • caption the caption
DecimalField(caption : String, binding* : Binding) CONSTRUCTOR

Creates a decimal field with given label and given property.

Parameters:

  • caption the caption
  • binding the binding, not null. Must hold Boolean value.
DecimalField(caption : String, ref* : Reference<Decimal>) CONSTRUCTOR

Creates a decimal field with given label, referencing given variable/field.

Parameters:

  • caption the caption
  • ref the reference not null.
getUserText() : String

Returns:

  • field value as written and currently visible. Unlike getValue method, this returns whatever is in field including invalid or unparseable values.
getValue() : Decimal
setNumberFormat(numberFormat : String) : void

Sets the number format for the decimal field, for example df.setNumberFormat("#,##0.00;\(#,##0.00\)"). See https://docs.oracle.com/javase/7/docs/api/java/text/DecimalFormat.html for further information on the formatting string. By default the default number format of user's locale is used.

Parameters:

  • numberFormat the number format to use; null to use the default number format for user's locale.
setNumberFormats(numberFormats* : List<String>) : void

Sets the number formats for this decimal field. By default a default number format for user's locale is selected. The field will accept user string if any of the formats is able to convert it to number. If multiple formats match the number, first one is used.

When formatting numbers, first format is used.

Please see https://docs.oracle.com/javase/7/docs/api/java/text/DecimalFormat.html for information on the formatting string.

Parameters:

  • numberFormats the number formats to use, empty list to use default number format for user's locale.
setParseErrorMessage(message : String) : void
Customize error message that shows up when the string inside the field can not be converted to a number.
setProperty(ref* : Reference<Decimal>) : void

Sets the ReferenceValue being displayed by this component. By default a simple value with the initial value of null is displayed. The component is automatically refreshed.

Parameters:

  • value the new value holder.
toString() : String
DateField extends InputComponentWithValue

Shows Date values only. If the value typed by the user is not convertible to Date, isValid() returns false.

DateField() CONSTRUCTOR
Creates a date field with no label and simple value holder.
DateField(caption : String) CONSTRUCTOR

Creates a date field with given label and simple value holder.

Parameters:

  • caption the caption
DateField(caption : String, binding* : Binding) CONSTRUCTOR

Creates a date field with given label and given property.

Parameters:

  • caption the caption
  • binding the binding, not null. Must hold Date value.
DateField(caption : String, ref* : Reference<Date>) CONSTRUCTOR

Creates a date field with given label, referencing given variable/field.

Parameters:

  • caption the caption
  • ref the reference not null.
getUserText() : String

Returns:

  • field value as written and currently visible. Unlike getValue method, this returns whatever is in field including invalid or unparseable values.
getValue() : Date
setBinding(ref : Reference<Date>) : void

Sets the ReferenceValue being displayed by this component. By default a simple value with the initial value of null is displayed. The component is automatically refreshed. If the reference is null, previous reference is cleared and field is empty.

Parameters:

  • ref reference to the new value holder.
setDateFormat(dateFormat : String) : void
setDateFormats(dateFormats* : List<String>) : void

Sets the formats accepted by this date field. The date field resolution (or precision - second, minute, hour, day, month, year) is updated automatically. The list may contain a special String constant "date" or "dateTime" - this constant is automatically replaced by application messages named "app.dateFormat" or "app.dateTimeFormat" respectively, via the LspsAppConnector.getApplicationMessage().

For formatting string specification please follow http://docs.oracle.com/javase/6/docs/api/java/text/SimpleDateFormat.html

Parameters:

  • dateFormats the list of accepted date formats. Must not be null. Must not be empty. First list item format is used to format the value in the field itself. User can however delete the text in the date field and enter a new date in any of these formats.
setParseErrorMessage(parsingErrorMessage : String) : void
Sets error message to be used when text in the field can not be parsed into date. If null then default unlocalized error message is used.
toString() : String
RecordAndPropertyREAD-ONLY
record : Record
property : Property
toString() : String
BrowserFrame extends FormComponent
BrowserFrame() CONSTRUCTOR
Creates a frame which initally shows nothing. Call #setUrl(String) to force the frame to show a web page.
BrowserFrame(url* : String) CONSTRUCTOR

Creates a frame which shows given URL.

Parameters:

getUrl() : String

Returns the URL set via the #setUrl(String) method. Does not return the current frame URL, which may have been changed for example as a result of redirects and/or user clicking on links.

Returns:

  • the URL, may be null if #setUrl(String) has not yet been called.
postMessage(message : String) : void

Posts message to target frame.

Parameters:

  • message - the message
postMessage(message : String, targetOrigin : String) : void

Posts message to target frame.

Parameters:

  • message - the message
  • targetOrigin - the message is sent only if frame origin matches this URI. Use "*" to specify any origin.
refresh() : void
setMessageListener(listener : {MessageEvent : void}) : void
Installs listener that will get all messages sent by post message methods.
setUrl(url : String) : void
Forces the frame to show given URL. The frame may follow redirects and show a completely different URL.
toString() : String
Grid extends FormComponent
addButtonColumn(buttonCaption* : String, onClick* : {Null : void}) : GridColumn

Adds a column containing just a single button. Utility method which ultimately calls addColumn().

Parameters:

  • buttonCaption the text rendered on every button.
  • onClick Called when the button is clicked. Receives the business data for given row as input. Closure result is ignored.

Returns:

  • the column, not null.
addColumn(valueProvider* : ValueProvider) : GridColumn

Adds a sortable column to this Grid. The column is by default filtrable and has no renderer.

Parameters:

  • valueProvider Provides values to show in this column's cells. Not null.

Returns:

  • the newly added column, not null.
addColumn(valueProvider* : ValueProvider, header* : String) : GridColumn

Adds a sortable column to this Grid. The column is by default filtrable and has no renderer.

Parameters:

  • valueProvider Provides values to show in this column's cells. Not null.
  • header the column header, not null.

Returns:

  • the newly added column, not null.
addColumn(valueProvider* : ValueProvider, renderer : Renderer, sortable : Boolean) : GridColumn

Adds a column to this Grid. You can call this before or after the data source has been set. The column is by default filtrable and has no header.

Parameters:

  • valueProvider Provides values to show in this column's cells. Not null.
  • renderer Renders every cell in this Grid column - generates HTML code and updates the code according to the row-extracted data. The HTML code generator is implemented in Java - for details please see Vaadin documentation on Grid Renderers.
  • sortable If false, the column will not be sortable.

Returns:

  • the newly added column, not null.
addColumn(valueProvider* : ValueProvider, renderer : Renderer, sortable : Boolean, editable : Boolean, editor : Editor) : GridColumn

Adds a column to this Grid. You can call this before or after the data source has been set. The column is by default filtrable and has no header.

Parameters:

  • valueProvider Provides values to show in this column's cells. Not null.
  • renderer Renders every cell in this Grid column - generates HTML code and updates the code according to the row-extracted data. The HTML code generator is implemented in Java - for details please see Vaadin documentation on Grid Renderers.
  • sortable If false, the column will not be sortable.
  • editable If false, the column will not be editable.
  • editor Editor definition if the column is editable and the value requires special editor.

Returns:

  • the newly added column, not null.
addColumn(valueProvider* : ValueProvider, filterValueProvider : ValueProvider, sortValueProvider : ValueProvider, renderer : Renderer, sortable : Boolean, editable : Boolean, editor : Editor) : GridColumn
addLinkColumn(linkCaption* : String, onClick* : {Null : void}) : GridColumn

Adds a column containing just a single link. Utility method which ultimately calls addColumn().

Parameters:

  • linkCaption the text rendered on every link.
  • onClick Called when the button is clicked. Receives the business data for given row as input. Closure result is ignored.

Returns:

  • the column, not null.
getColumns() : List<GridColumn>

Returns the current list of columns in the current order.

Returns:

  • the current columns, not null, may be empty.
getComponents() : List<FormComponent>

Returns the list of the components currently rendered in the grid.

The components in the grid are transient: The grid detaches and forgets its components, and creates and attaches new ones as the user scrolls. The method returns the components currently attached to the page, that is, the displayed rows plus a few rows above and a few rows below. The components that are not loaded or have been detached are not returned. Therefore, do not store the returned components for later. The returned components are not ordered.

Returns:

  • a list of contained components
getDataSource() : DataSource

Returns the current Grid data source.

Returns:

  • the currently set data source. If none has been set yet, this returns null.
getFrozenColumnCount() : Integer

Gets the number of frozen columns in this grid. 0 means that no data columns will be frozen, but the built-in selection checkbox column will still be frozen if it's in use. -1 means that not even the selection column is frozen.

NOTE: this count includes hidden columns in the count.

Returns:

  • the number of frozen columns
getHeightByRows() : Decimal

Returns the current row-height. Please see setHeightByRows() for more information.

Returns:

  • the current row-height, not null, 0 or greater.
getSelection() : List<Object>

Returns list of currently selected row objects or an empty list. The rows were selected either by user clicking on the grid rows, or by calling select() programatically. Grid in single select mode returns a list with one element. Initially, there is no row selected.

Returns:

  • currently selected row object, null if there is no selection.
getSelectionChangeListener() : {ValueChangeEvent : void}

Gets the current value change listener

Returns:

  • the current value change listener or null if none is installed.
getSelectionMode() : SelectionMode
Returns current selection mode.
isColumnReorderingAllowed() : Boolean

Returns whether column reordering is allowed or not - that is, whether the user can drag a column to the new location or not.

Returns:

  • whether column reordering is allowed or not. Never null.
isDetailsVisible(item : Object) : Boolean
Returns the visibility of details component for given item.
isSelectAllCheckBoxVisible() : Boolean
Returns select all checkbox visibility when in multiselect mode.
isSelectable() : Boolean
Returns true if the table is either in single row selection mode or multiple rows selection mode. Returns false otherwise.
recalculateColumnWidths() : void

Requests that the column widths should be recalculated.

In most cases Grid will know when column widths need to be recalculated but this method can be used to force recalculation in situations when grid does not recalculate automatically.

Note: if the user manually resized any of the columns, the method does nothing. It wont modify users configuration.

refresh() : void
Refreshes the contents of this Grid - polls the data source for fresh data.
select(rowObject : Object) : void

Marks an item as selected. Unselects all other items. The row object must have been provided by the DataSource. Calling select(null) clears the selection. Fails if the grid is not selectable.

Parameters:

  • rowObject select the row for this row object. If null, the selection is cleared.
select(rowObjects : Collection<Object>) : void

Changes grid selection. Previous selection is cleared and new set of rows is selected. Exact behavior depends on selection mode:

  • NONE - call fails.
  • SINGLE - previous selection is cleared. If the rowObjects argument is non-empty, only one row is selected.
  • SINGLE - previous selection is cleared. If the rowObjects argument is non-empty, all objects in it are selected.

All row objects must have been provided by the DataSource.

setColumnOrder(expectedColumnsOrder : List<GridColumn>) : void

Sets a new column order for the grid. All columns which are not ordered here will remain in the order they were before as the last columns of grid.

Parameters:

  • columnsInOrders the columns in the order they should be
setColumnOrder(expectedColumnsOrder* : GridColumn...) : void

Sets a new column order for the grid. All columns which are not ordered here will remain in the order they were before as the last columns of grid.

Parameters:

  • columnsInOrders the columns in the order they should be
setColumnReorderListener(listener : {ColumnReorderEvent : void}) : void

Sets callback for columns reorder event.

Parameters:

  • listener the listener to be notified
setColumnReorderingAllowed(columnReorderingAllowed* : Boolean) : void

Sets whether column reordering is allowed or not - that is, whether the user can drag a column to the new location or not. By default this value is set to true.

Parameters:

  • columnReorderingAllowed specifies whether column reordering is allowed.
setColumnResizeListener(listener : {GridColumn : void}) : void

Sets a column resize listener to this grid. Replaces any previously set column resize listener. Setting null will remove any previously set column resize listener.

Parameters:

  • listener the listener which will be notified when a grid column resize event occrus
setDataSource(dataSource : DataSource) : void

Sets a new data source to this Grid. The grid automatically refreshes itself.

Parameters:

  • dataSource the new data source to be shown. May be null - in such case an empty Grid will be shown.

Returns:

  • this
setDescription(tooltipGenerator* : {Null : String}) : void

Sets common tooltip on all grid columns. The closure obtains row object and generates tooltip string. If it returns null, nothing is shown. Uses "Preformatted" content mode.

Note: Column tooltip (description) set directly on column takes precedence over row tooltip set here.

Parameters:

  • tooltips - closure obtains row object and generates tooltip
setDescription(tooltipGenerator* : {Null : String}, contentMode* : ContentMode) : void

Sets common tooltip on all grid columns. The closure obtains row object and generates tooltip string. If it returns null, nothing is shown.

Note: Column tooltip (description) set directly on column takes precedence over row tooltip set here.

Parameters:

  • tooltips - closure obtains row object and generates tooltip
  • contentMode - defines tooltip formatting
setDetailsGenerator(detailsGenerator : {Null : FormComponent}) : void
Sets the details component generator. Detail component is shown between grid rows and can be large compared to grid data.
setDetailsVisible(item : Object, visible : Boolean) : void
Sets the visibility of details component for given item.
setEditorBuffered(buffered* : Boolean) : void

Sets the buffered flag for the editor row. If the editor is buffered the changes are not propagated to the model directly but are buffered first and are propagated to the modle only after the user finishes editing by pressing a save button. If user finishes editing by pressing a cancel button the edited changes are lost.

By default the editor is buffered.

setEditorEnabled(enabled* : Boolean) : void

Sets the enabled state of the value editor. If the editor is enabled the editor is displayed on row double click.

Parameters:

  • enabled if true the editor row is enabled
setFilterChangedListener(listener : {FilterChangedEvent : void}) : void

Sets callback for grid filter event.

Parameters:

  • listener the listener to be notified
setFiltrable(filtrable* : Boolean) : void

Setting false here will hide the filter component for all columns. Equivalent of calling GridColumn.setFiltrable for every column.

Parameters:

  • filtrable if false, the filter components will be hidden for all columns; if true, the filter components will be generated.
setFrozenColumnCount(numberOfColumns* : Integer) : void

Sets the number of frozen columns in this grid. Setting the count to 0 means that no data columns will be frozen, but the built-in selection checkbox column will still be frozen if it's in use. Setting the count to -1 will also disable the selection column.

The default value is 0.

Parameters:

  • numberOfColumns the number of columns that should be frozen

Throws:

  • IllegalArgumentException if the column count is < 0 or > the number of visible columns
setHeightByRows(heightByRows* : Decimal) : void

Sets the Grid row-height. Setting this to a non-zero value will make the Grid show exactly given number of rows, with the header and a possible scrollbar. In this mode the Grid will ignore its current component height as set by setHeight()/getHeight().

Setting row-height to zero will cause the Grid to again respect the component height.

Defaults to zero. You can use fraction numbers.

As opposed to AbstractTable.setPageLength(), it is not possible to configure Grid's server-client fetch page size.

Parameters:

  • heightByRows the new row-height, 0 or greater.
setItemClickListener(listener : {ItemClickEvent : void}) : void

Sets the listener for row item click events.

Parameters:

  • listener the listener to set
setRowStyleGenerator(rowStyleGenerator : {Null : String}) : void

Sets the style generator that is used for generating styles for rows. The generator obtains a row objects and returns css class that will be added to that row div.

Parameters:

  • styleGenerator the row style generator to set, or null to remove a previously set generator
setSelectAllCheckBoxVisible(visible : Boolean) : void

Sets the select all checkbox visibility when in multiselect (MULTI) selection mode. The setting is ignored if the grid is in SINGLE or NONE selection mode.

WARNING: checking select all checkbox causes all items in the datasource to be loaded into memory. Do not use this unless you are sure the datasource is small.

Parameters:

  • visible - whether select all checkbox is visible
setSelectable(selectable* : Boolean) : void
If the arguments is true, sets the selection mode to SINGLE. Otherwise sets it to NONE.
setSelectionChangeListener(listener : {ValueChangeEvent : void}) : void
Sets or clears the selection change listener. Use getSelection() to query for the current selection.
setSelectionMode(selectionMode* : SelectionMode) : void
Sets selection mode for the grid. Grid supports three kinds of selection: single row selection, multiple rows selection and no selection. The grid is not selectable by default.
setSortListener(listener : {SortEvent : void}) : void

Sets callback for grid sort event.

Parameters:

  • listener the listener to be notified
toString() : String
GridColumn

Do not create directly - instead, use the Grid.addColumn functions.

grid : Grid

The owner grid, not null.

valueProvider : ValueProvider

Provides values to show in this column's cells.

sortValueProvider : ValueProvider
filterValueProvider : ValueProvider
renderer : Renderer

Renders every cell in this Grid column - generates HTML code and updates the code according to the row-extracted data. The HTML code generator is implemented in Java - for details please see Vaadin documentation on Grid Renderers.

If null, the objects provided by the value provider are converted to string (using the toString() function) and displayed as strings. In case of the built-in Button or Link Renderers, the string value obtained from the value provider will be shown as a Button's/Link's caption.

editable : Boolean

Enables editing support in this column.

editor : Editor
sortable : Boolean

If false, the column will not be sortable.

modelingIdDEPRECATED : String

Modeling id of the component. Do not use the field directly, use getModelingId and setModelingId methods instead.

data : Object

Arbitrary data which you can use for any purpose. This field is not used by the Forms framework itself.

getAlignment() : Alignment

Returns the current column's child alignment, with respect to the column itself. Defaults to left alignment.

Returns:

  • the alignment, never null.
getComponentInRow(rowObject : Object) : FormComponent

If the column contains a component renderer, returns the component generated from rowObject. Otherwise returns null.

Returns:

  • component or null
getExpandRatio() : Integer

Returns the column's expand ratio.

Returns:

  • the column's expand ratio
getFilterConfig() : FilterConfig

Gets the current filter configuration for this column.

Returns:

  • filter configuration or null if this column does not have a filter configuration.
getHeader() : String

Returns the caption of the header. By default the header caption is an empty string.

Returns:

  • the text in the default row of header.

Throws:

  • IllegalStateException if the column no longer is attached to the grid
getHeaderAlignment() : Alignment

Returns the current column's header content alignment. Defaults to left alignment.

Returns:

  • the alignment, never null.
getHeaderStyleName() : String

Returns the style name of this column's header.

Returns:

  • the column's header style name
getHidingToggleCaption() : String

Gets the caption of the hiding toggle for this column.

Returns:

  • the caption for the hiding toggle for this column

Throws:

  • IllegalStateException if the column is no longer attached to any grid
getMaximumWidth() : Integer

Returns the maximum width for this column.

Returns:

  • the maximum width for this column
getMinimumWidth() : Integer

Return the minimum width for this column.

Returns:

  • the minimum width for this column
getModelingId() : String

Gets the modeling ID of this component.

Returns:

  • the modeling ID
getUniqueModelingId() : String

Gets html id of this component as rendered on the page or null if there is no direct representation.

Returns:

  • the modeling ID
getWidth() : Integer

Returns the width (in pixels). By default a column is 100px wide.

Returns:

  • the width in pixels of the column. null if the width is undefined.

Throws:

  • IllegalStateException if the column is no longer attached to any grid
isFiltrable() : Boolean

Checks whether the Grid should show the filtering component for this column.

Returns:

  • true if the column is user-filtrable, false if not.
isHidable() : Boolean

Returns whether this column can be hidden by the user. Default is false.

Note: the column can be programmatically hidden using #setHidden(boolean) regardless of the returned value.

Returns:

  • true if the user can hide the column, false if not
isHidden() : Boolean

Returns whether this column is hidden. Default is false.

Returns:

  • true if the column is currently hidden, false otherwise
isResizable() : Boolean

Returns whether this column can be resized by the user. Default is true.

Note: the column can be programmatically resized using #setWidth(double) and #setWidthUndefined() regardless of the returned value.

Returns:

  • true if this column is resizable, false otherwise
isSortAscending() : Boolean

Returns true if the grid is sorted in ascending order and false if it is sorted in descending order. Can return anything for unsorted columns.

Returns:

  • whether the grid is sorted by the specified column
isSorted() : Boolean

Returns whether the grid is sorted by the specified column

Returns:

  • whether the grid is sorted by the specified column
remove() : void
Removes the column from the grid. This record instance becomes invalid and must not be used anymore.
setAlignment(alignment* : Alignment) : void

Sets the specified column's child component alignment inside of the column. In order for this to work, the div element produced by renderer must wrap its contents, otherwise the child will just fill the column and there will be no space for the alignment flag to move the child.

Ignores the vertical aspect of the alignment - only the horizontal aspect is applied.

Parameters:

  • alignment the desired alignment, not null. Defaults to left align.
setCellStyleGenerator(rowStyleGenerator : {Null : String}) : void
setDescription(tooltipGenerator* : {Null : String}) : GridColumn

Sets the tooltip on the grid column. Column tooltip takes precedence over row tooltip (description) set on grid. If both are set, only column tooltip is shown. The closure obtains row object and generates tooltip string. If it returns null, the row tooltip common for all columns is show instead.

Uses "Preformatted" content mode.

Parameters:

  • tooltips - closure obtains row object and generates tooltip
setDescription(tooltipGenerator* : {Null : String}, contentMode* : ContentMode) : GridColumn

Sets the tooltip on the grid column. Column tooltip takes precedence over row tooltip (description) set on grid. If both are set, only column tooltip is shown. The closure obtains row object and generates tooltip string. If it returns null, the row tooltip common for all columns is show instead.

Parameters:

  • tooltips - closure obtains row object and generates tooltip
  • contentMode - defines tooltip formatting
setExpandRatio(expandRatio : Integer) : GridColumn

Sets the ratio with which the column expands.

By default, all columns expand equally (treated as if all of them had an expand ratio of 1). Once at least one column gets a defined expand ratio, the implicit expand ratio is removed, and only the defined expand ratios are taken into account.

If a column has a defined width (#setWidth(double)), it overrides this method's effects.

Example: A grid with three columns, with expand ratios 0, 1 and 2, respectively. The column with a ratio of 0 is exactly as wide as its contents requires. The column with a ratio of 1 is as wide as it needs, plus a third of any excess space, because we have 3 parts total, and this column reserves only one of those. The column with a ratio of 2, is as wide as it needs to be, plus two thirds of the excess width.

Parameters:

  • expandRatio the expand ratio of this column. 0 to not have it expand at all. A null to clear the expand value.

Throws:

  • IllegalStateException if the column is no longer attached to any grid
setFilterConfig(config : FilterConfig) : void

Sets the new filter configuration to the grid.

Parameters:

  • config filter configuration must be a subtype of forms::FilterConfig.
setFiltrable(filtrable* : Boolean) : GridColumn

Setting false here will hide the filter component for this column.

Parameters:

  • filtrable if false, the filter component will be hidden; if true, the filter component will be generated.
setHeader(header : String) : GridColumn

Sets the caption of the header. This caption is also used as the hiding toggle caption, unless it is explicitly set via #setHidingToggleCaption(String).

Parameters:

  • caption the text to show in the caption

Returns:

  • the column itself

Throws:

  • IllegalStateException if the column is no longer attached to any grid
setHeaderAlignment(alignment* : Alignment) : void

Sets the specified column's header content alignment.

Ignores the vertical aspect of the alignment - only the horizontal aspect is applied.

Parameters:

  • alignment the desired alignment, not null. Defaults to left align.
setHeaderDescription(tooltip : String) : GridColumn

Sets the tooltip on the grid column header. Uses "Preformatted" content mode.

Parameters:

  • tooltip - tooltip
setHeaderDescription(tooltip* : String, contentMode* : ContentMode) : GridColumn

Sets the tooltip on the grid column header.

Parameters:

  • tooltip - tooltip
  • contentMode - defines tooltip formatting
setHeaderStyleName(styleName : String) : void

Sets the style name to this column's header.

Parameters:

  • styleName the style name to add to the column's header
setHidable(hidable* : Boolean) : GridColumn

Sets whether this column can be hidden by the user. Hidable columns can be hidden and shown via the sidebar menu.

Parameters:

  • hidable true iff the column may be hidable by the user via UI interaction

Returns:

  • this column
setHidden(hidden* : Boolean) : GridColumn

Hides or shows the column. By default columns are visible before explicitly hiding them.

Parameters:

  • hidden true to hide the column, false to show

Returns:

  • this column
setHidingToggleCaption(hidingToggleCaption : String) : GridColumn

Sets the caption of the hiding toggle for this column. Shown in the toggle for this column in the grid's sidebar when the column is hidable.

The default value is null, and in that case the column's header caption is used.

NOTE: setting this to empty string might cause the hiding toggle to not render correctly.

Parameters:

  • hidingToggleCaption the text to show in the column hiding toggle

Returns:

  • the column itself

Throws:

  • IllegalStateException if the column is no longer attached to any grid
setMaximumWidth(pixels : Integer) : GridColumn

Sets the maximum width for this column.

This defines the maximum allowed pixel width of the column when it is set to expand.

Parameters:

  • pixels the maximum width. null clears the maximum width.

Throws:

  • IllegalStateException if the column is no longer attached to any grid
setMinimumWidth(pixels : Integer) : GridColumn

Sets the minimum width for this column.

This defines the minimum guaranteed pixel width of the column when it is set to expand.

Parameters:

  • pixels the minimum width in pixels. null clears the minimum width.

Throws:

  • IllegalStateException if the column is no longer attached to any grid
setModelingId(modelingId : String) : void

Sets the modeling ID of this component.

Parameters:

  • modelingId - modeling id to be set to component
setResizable(resizable* : Boolean) : GridColumn

Sets whether this column can be resized by the user.

Parameters:

  • resizable true if this column should be resizable, false otherwise
setSorted(sorted* : Boolean) : void

Sets whether the specified column is used for grid sort or not. The column will be in ascending order.

Parameters:

  • sorted true if the grid should be sorted by this column
setSorted(sorted* : Boolean, ascending* : Boolean) : void

Sets whether the specified column is used for grid sort or not and whether it should be ascending or descending.

Parameters:

  • sorted true if the grid should be sorted by this column
  • ascending true if the grid should be in ascending order, false otherwise
setWidth(pixelWidth : Integer) : GridColumn

Sets the width (in pixels).

This overrides any configuration set by any of #setExpandRatio(int), #setMinimumWidth(double) or #setMaximumWidth(double).

Provide null to set the column width to undefined. An undefined width means the grid is free to resize the column based on the cell contents and available space in the grid.

Parameters:

  • pixelWidth the new pixel width of the column. null sets the width to undefined.

Returns:

  • the column itself

Throws:

  • IllegalStateException if the column is no longer attached to any grid
  • IllegalArgumentException thrown if pixel width is less than zero
toString() : String
FormsREAD-ONLY

Utility methods for your UI - you can e.g. Call ui() to obtain instance of this class. You can control the UI with this class.

addBrowserWindowResizeListener(listener* : { : void}) : void
detectLocation(opts : PositionOptions, resultCallback* : {GeolocationEvent : void}) : void

Asks the browser to detect the geoposition location. When the location is detected (or the detection is rejected by the user or any other error happens), the callback is invoked.

Parameters:

  • opts optional geolocation detection options. If null, defaults are used.
  • resultCallback invoked when the desired GPS position with desired accuracy is available, or an error occurred.
executeJavascript(javascript : String) : void
getBrowserWindowSize() : Dimension
Retrieves the size, in DIPs, of the current browser window.
handleSubmitNavigation(todos : Set<Todo>, navigation : Navigation) : void

Handles the submit navigation logic.

Parameters:

  • todos the newly created todos
  • navigation the navigation which should be applied if the document/todo navigation rule does not yield a navigation
navigateTo(navigation : Navigation) : void

Navigates to given target.

Parameters:

  • navigation target, may be null - in such case it simply navigates to the root (or default) page, which by default is the Todo List page. To override this, open the LspsUI Java class, the openHomePage() method and implement accordingly.
navigateToDocument(documentType* : DocumentType) : void

Navigates to given document.

Parameters:

  • documentType the document type, call the document function to obtain the type. Not null.
  • parameters optional document parameters
navigateToDocument(documentType* : DocumentType, parameters : Map<String, Object>) : void

Navigates to given document.

Parameters:

  • documentType the document type, call the document function to obtain the type. Not null.
  • parameters optional document parameters
navigateToUrl(url* : String) : void

Redirects the browser to http:// link.

Parameters:

  • url the link
save() : Record

Saves the form. The result of this action is either a saved Todo (human::Todo) or a saved Document (human::SavedDocument).

Returns:

  • Todo or SavedDocument depending on the context in which the method was invoked.
submit() : void
Submits this todo and navigates further.
submit(navigation : Navigation) : void

Submits a form (document/todo) and navigates further.

Parameters:

  • navigation the navigation which will be used if the document/todo does not yield a navigation
submitInternal() : List<Todo>
LinkRenderer extends Renderer

Renders a simple link, with the cell value set at its caption.

onClick : {Null : void}

Called when the button is clicked. Receives the business data for given row as input. Closure result is ignored.

LinkRenderer() CONSTRUCTOR
Creates a new link renderer.
LinkRenderer(listener : {Null : void}) CONSTRUCTOR

Creates a new link renderer with the click listener.

Parameters:

  • listener the listener which will be notified about the click events.
getClickListener() : {Null : void}
Gets the listener handling the click event.
setClickListener(listener : {Null : void}) : void

Sets the click listener which is called when the link is clicked. The listener receives the business data for given row as input. The closure result is ignored.

Parameters:

  • listener the closure handling the click event
RendererABSTRACT
ButtonRenderer extends Renderer

Renders a simple single button, with the cell value set at its caption.

onClick : {Null : void}

Called when the button is clicked. Receives the business data for given row as input. Closure result is ignored.

ButtonRenderer() CONSTRUCTOR
Creates a new button renderer.
ButtonRenderer(listener : {Null : void}) CONSTRUCTOR

Creates a new button renderer with click listener.

Parameters:

  • listener the listener which will be notified about the click events.
getClickListener() : {Null : void}
Gets the listener handling the click event.
setClickListener(listener : {Null : void}) : void

Sets the click listener which is called when the button is clicked. The listener receives the business data for given row as input. The closure result is ignored.

Parameters:

  • listener the closure handling the click event
ComboBox extends AbstractComboBox

Combo box form component

ComboBox() CONSTRUCTOR
Creates a combobox with no label and a simple value holder.
ComboBox(caption : String) CONSTRUCTOR

Creates a combobox with the given label and a simple value holder.

Parameters:

  • caption caption of the combo box
ComboBox(caption : String, binding* : Binding) CONSTRUCTOR

Creates a combobox with the given binding.

Parameters:

  • caption caption
  • binding binding which holds the selected value
ComboBox(caption : String, ref* : Reference<Object>) CONSTRUCTOR

Creates a combobox that references the given variable/field and has the given caption.

Parameters:

  • caption caption
  • ref reference; must not be null.
getHint() : String

Gets the hint text - a textual prompt that is displayed when the field would otherwise be empty, to prompt the user for input.

Returns:

  • hint text, initially null.
getPageLength() : Integer

Gets the page length (the number of options shown in the suggestion popup). Zero disables paging and shows all items. Default value is 10.

Parameters:

  • pageLength the new page length, 0 or greater.
setHint(hint : String) : void

Sets the hint text - a textual prompt that is displayed when the field would otherwise be empty, to prompt the user for input. For example "A value in USD, omitting the dollar sign". The hint text is initially null.

Parameters:

  • hint the new hint text, may be null.
setPageLength(pageLength* : Integer) : ComboBox

Sets the page length (the number of options shown in the suggestion popup). Setting this to zero disables paging and shows all items. Default value is 10.

Parameters:

  • pageLength the new page length, 0 or greater.
toString() : String
ReferenceBinding

A reference binding with the reference to the value for the component.

ref : Reference<Object>

reference to the value

ReferenceBinding(reference* : Reference<Object>) CONSTRUCTOR

Creates a binding which reads and writes the value for the component into given reference.

Parameters:

  • reference reference value; must not be null.
get() : Object
getBinding() : RecordAndProperty

Returns:

  • If the reference points to record's property, returns the record and the property. If the reference points to a variable, returns null.
getRecordAndProperty(ref* : Reference<Object>) : RecordAndProperty
If the reference points to record's property, returns the record and the property. If the reference points to a variable, returns null.
set(value : Object) : void
toString() : String
ObjectBinding

Binding with the value for the component. It is mutable.

value : Object

The value provided, may be null. Mutated by call to set(Object).

ObjectBinding() CONSTRUCTOR
Creates the binding with the initial value set to null.
ObjectBinding(value : Object) CONSTRUCTOR

Creates the object binding and sets the value to the given value.

Parameters:

  • value the initial value; may be null.
get() : Object
getBinding() : RecordAndProperty

Returns:

  • always null
set(newVal : Object) : void
toString() : String

Returns:

  • not localizable value of the binding
FormABSTRACT extends UIDefinition

A default superclass for all forms.

To define an API for your form, just add methods to your form's object.

To add support for listeners, just introduce a method which takes a closure, and call the closure as needed.

To insert the reusable form programatically into layout components, just create the form via the new keyword, then call getWidget() to obtain the FormComponent, and finally insert the FormComponent itself into the layout.

widget : FormComponent
modelingId : String

Modeling id of the component. Do not use the field directly, use getModelingId and setModelingId methods instead.

createWidget() : FormComponent

Called exactly once, to create the widget contents.

Returns:

  • widget the widget, must not be null.
getModelingId() : String

Gets the modeling ID of this component.

Returns:

  • the modeling ID
getUniqueModelingId() : String

Gets html id of this component as rendered on the page or null if there is no direct representation.

Returns:

  • the modeling ID
getWidget() : FormComponent
This method will be called by LSPS, to obtain the component which will be shown on-screen.
onLoad() : void
This method is called by framework after the form was restored from saved todo or document.
setModelingId(modelingId : String) : void

Sets the modeling ID of this component.

Parameters:

  • modelingId - modeling id to be set to component
Validatable

A component which may contain invalid value.

Does not have support for adding validators, as this interface is also implemented by layout components which have no support for validators. You can only attach validators to subclasses of ComponentWithValue.

isConvertible() : BooleanDEPRECATED
Deprecated, returns the same thing as #isValid.
isValid() : Boolean

Checks if this component is valid - that is:

  1. it has a non-empty value if it is required;
  2. the value can be parsed and compatible with target data type.
  3. all validators succeed

A component will not call Value.set() if the value is not valid. This causes bindings to be not updated and binding-based validations to work on old values.

Not all Validatables allow validators to be attached. For example component groups do not allow custom validators -they only validates its child components.

Only validators attached to component using addValidator method influence the result. Error message set by FormComponent.setErrorMessage method does not influence the result. Data error messages distributed using by showConstraintViolations visible from FormComponent.getDataErrorMessages dont influence the result either.

Returns:

  • true if the component and all its child are valid, i.e. all validators attached to this component and to its descendants succeeded.
Rect
x : Integer
y : Integer
width : Integer
height : Integer
AbstractSelectABSTRACT extends InputComponentWithValue
isNullSelectionAllowed() : Boolean
setNullSelectionAllowed(nullSelectionAllowed* : Boolean) : void

Allow or disallow empty selection by the user. By default the null selection is allowed.

Parameters:

  • nullSelectionAllowed whether or not to allow empty selection
setOptions(options* : Collection<SelectItem>) : void

Sets a constant list of options to be shown in this select component. Choosing an item from options will write SelectItem.value to the underlying Value. By default the select has zero options.

Parameters:

  • options a collection of options, not null.
setOptions(options* : Collection<Object>) : void

Sets a constant list of options to be shown in this select component. The caption is computed by calling toString on the object. By default the select has zero options.

Parameters:

  • options a collection of options, not null.
setOptions(options* : Map<Object, String>) : void

Sets a constant list of options to be shown in this select component. Choosing an item from the map will write the map's key to the underlying Value. By default the select has zero options.

Parameters:

  • options a map of options, not null. Maps possible values to captions.
setOptionsDataSource(optionValues* : DataSource, caption* : ValueProvider) : void

Sets the available options for this selector to display. The DataSource provides business objects listed in the selector; choosing an item from options will write it to the underlying Value. By default the selector has zero options.

Parameters:

  • optionValues provides available options for the selector. The DataSource is not asked to sort items - use DataSource.withSort() for that.
  • caption provides captions for the options items.
SingleSelectList extends AbstractSelect
SingleSelectList() CONSTRUCTOR
Creates a single-select-list with no label and simple value holder.
SingleSelectList(caption : String) CONSTRUCTOR

Creates a single-select-list with given label and simple value holder.

Parameters:

  • caption the caption
SingleSelectList(caption : String, binding* : Binding) CONSTRUCTOR

Creates a single-select-list with given label and given binding.

Parameters:

  • caption the caption
  • binding the binding, not null. Must hold Boolean value.
SingleSelectList(caption : String, ref* : Reference<Object>) CONSTRUCTOR

Creates a single-select-list with given label, referencing given variable/field.

Parameters:

  • caption the caption
  • ref the reference not null.
getRowsCount() : Integer

Returns the number of rows to show in the list. If the number of rows is set 0, the actual number of displayed rows is determined implicitly by the adapter.

Returns:

  • rows the number of rows to show, 0 or more.
setRowsCount(rows* : Integer) : void

Sets the number of rows in the editor. If the number of rows is set 0, the actual number of displayed rows is determined implicitly by the adapter.

Parameters:

  • rows the number of rows to set, 0 or more.
toString() : String
GSDashboard extends FormComponent
onWidgetUpdate : {DashboardUpdateEvent : void}
addWidget(component* : FormComponent, position : Rect, autoposition* : Boolean) : GSDashboardWidget

Creates a new widget and adds it to the dashboard.

Parameters:

  • component the content component of the widget, not null.
  • position if not null, the widget will be positioned at exactly this position. Must not be null if autoposition is false. The position is not given in pixels, but in dashboard cells instead. The dashboard has 12 columns and an unlimited number of rows.
  • autoposition if true, the widget will be positioned automatically at the nearest topmost-leftmost free position in the dashboard. The widget will by default take 1x1 cell, unless position is given - in that case the widget's width and height is taken from the 'position' parameter. If false, the position parameter is required and the widget is positioned as specified by the parameter.
getComponentCount() : Integer
Returns the number of child components present in this component. The returned number includes the widgets components and their toolbars
getComponents() : List<FormComponent>

Returns the child components as a list. The list contains widgets content and toolbar components as well. If interested in widgets use #getWidgets() instead.

Returns:

  • the list of all child components, not null, may be empty.
getDashboardUpdateListener() : {DashboardUpdateEvent : void}
Gets the listener handling the DashboardUpdateEvents.
getModelingId() : String

Gets the modeling ID of this component.

Returns:

  • the modeling ID
getUniqueModelingId() : String

Gets html id of this component as rendered on the page or null if there is no direct representation.

Returns:

  • the modeling ID
getWidgets() : List<GSDashboardWidget>

Returns all widgets currently added to this dashboard.

Returns:

  • a list of widgets, not null, may be empty.
isConvertible() : BooleanDEPRECATED
Deprecated, returns the same thing as #isValid.
isValid() : Boolean
Checks if all child groups and child ComponentWithValues are valid. If any invalid child is found, returns false.
refresh() : void
Calls refresh() on all nested components with values.
removeWidget(widget* : GSDashboardWidget) : void

Removes the widget from the dashboard. The widget must no longer be used.

Parameters:

  • widget the widget to remove. Must be registered to this dashboard. Not null.
setDashboardUpdateListener(listener : {DashboardUpdateEvent : void}) : void

Sets the listener handling the DashboardUpdateEvents.

Parameters:

  • listener the listener to set
setMaximizeWindowTooltip(maximizeTooltip : String, restoreTooltip : String) : void

Tooltip for maximize widget button.

Parameters:

  • maximizeTooltip tooltip when the widget has normal size
  • restoreTooltip tooltip when the widget is maximized
setMinimizeWindowTooltip(minimizeTooltip* : String, restoreTooltip* : String) : void

Tooltip for minimize widget button.

Parameters:

  • minimizeTooltip tooltip when the widget has normal size
  • restoreTooltip tooltip when the widget is minimized
setModelingId(modelingId : String) : void

Sets the modeling ID of this component.

Parameters:

  • modelingId - modeling id to be set to component
toString() : String
GSDashboardWidget
owner : GSDashboard
component : FormComponent

The component, displayed by the widget.

data : Object

Arbitrary data which you can use for any purpose. This field is not used by the Forms framework itself.

modelingId : String
checkNotClosed() : void
close() : void
getCaption() : String
getModelingId() : String

Gets the modeling ID of this component.

Returns:

  • the modeling ID
getOwner() : GSDashboard
getPosition() : Rect
getState() : WidgetState
getUniqueModelingId() : String

Gets html id of this component as rendered on the page or null if there is no direct representation.

Returns:

  • the modeling ID
isCloseable() : Boolean

Returns:

  • whether close button is visible
isClosed() : Boolean
isConvertible() : BooleanDEPRECATED
Deprecated, returns the same thing as #isValid.
isMaximized() : Boolean
isMinimized() : Boolean
isRestored() : Boolean
isValid() : Boolean
Checks whether the child is valid. Returns false only if the child is not valid. If the component does not have a child or the child does not implement Validatable interface, retuns true.
maximize() : void
minimize() : void
restore() : void
setCaption(caption : String) : void
setCloseable(showCloseButton* : Boolean) : void
Hides and shows close widget button.
setModelingId(modelingId : String) : void

Sets the modeling ID of this component.

Parameters:

  • modelingId - modeling id to be set to component
setPosition(position* : Rect) : void
setState(state* : WidgetState) : void
setToolbar(component : FormComponent) : void
toString() : String
Popup extends SingleComponentContainer

A popup window. By default the popup is not visible, you need to call setVisible(true), show() or showModal() to show it on screen. By default the popup is not modal, it is resizable, draggable and closable.

You can model a Grid- or Table-based popup, which reveals more data as the popup is resized. To achieve this, simply call the setSizeFull() method on the Popup's content. This will however make the popup to be initially zero-sized; to remedy this, simply call popup's setWidth("50%"); setHeight("50%") before it is shown. This will make the popup to take 50% of browser window's width and height and will center the popup in the browser window.

The Popup descends from a FormComponent, yet it is an error to add the popup to any ComponentGroup: the Popup is not part of the UI component tree, but rather it floats over the components and "starts" its own component hierarchy.

onClose : {PopupCloseEvent : void}
Popup() CONSTRUCTOR
Creates a popup with no contents. The popup is initially invisible.
Popup(content : FormComponent) CONSTRUCTOR

Creates a popup with given component as its contents. The popup is initially invisible.

Parameters:

  • content the popup contents, may be null.
getPopupCloseListener() : {PopupCloseEvent : void}

Returns:

  • the popup close listener
hide() : Popup

Shortcut for setVisible(false)

Returns:

  • this
isClosable() : Boolean

Returns the closable status of the popup. If a popup is closable, it typically shows an X in the upper right corner. Clicking on the X sends a close event to the server. Setting closable to false will remove the X from the popup and prevent the user from closing the popup.

By default the popup is closable.

Returns:

  • true if the popup can be closed by the user.
isDraggable() : Boolean

Indicates whether a window can be dragged or not. By default a window is draggable.

Returns:

  • true if the window can be dragged by the user
isModal() : Boolean

Gets window modality. When a modal window is open, components outside that window cannot be accessed. Keyboard navigation is restricted by blocking the tab key at the top and bottom of the window by activating the tab stop function internally.

By default the popup is not modal.

Returns:

  • true if this window is modal.
isResizable() : Boolean

true if window is resizable by the end-user, otherwise false. Defaults to true.

Returns:

  • true if window is resizable by the end-user, otherwise false.
setClosable(closable* : Boolean) : void

Sets the closable status for the popup. If a popup is closable it typically shows an X in the upper right corner. Clicking on the X sends a close event to the server. Setting closable to false will remove the X from the popup and prevent the user from closing the popup.

By default the popup is closable.

Parameters:

  • closable determines if the popup can be closed by the user.
setDraggable(draggable* : Boolean) : void

Indicates whether a window can be dragged or not. By default a window is draggable.

Parameters:

  • draggable true if the window can be dragged by the user
setModal(modal* : Boolean) : void

Sets window modality. When a modal window is open, components outside that window cannot be accessed. Keyboard navigation is restricted by blocking the tab key at the top and bottom of the window by activating the tab stop function internally.

By default the popup is not modal.

Parameters:

  • modal true if modality is to be turned on
setPopupCloseListener(listener : {PopupCloseEvent : void}) : void

Sets the popup close listener which is notified on the popup close event.

Parameters:

  • listener the listener to set
setResizable(resizable* : Boolean) : void

true if window is resizable by the end-user, otherwise false. Defaults to true.

Parameters:

  • resizable true if window is resizable by the end-user, otherwise false.
show() : Popup

Shortcut for setVisible(true)

Returns:

  • this
showModal() : Popup

Shortcut for setModal(true); setVisible(true)

Returns:

  • this
toString() : String
TabSheet extends ComponentGroup

Adding components to the tab sheet will create tab for every individual component. You can then use the getTab() methods to return the Tab object which further controls the tab - you can set the tab's caption etc.

addTab(contents* : FormComponent, caption : String) : Tab

Helper method for quickly creating a tab with given caption. If the tab sheet already contains contents, existing tab caption is updated.

Parameters:

  • contents the tab contents, not null.
  • caption the new tab caption, may be null.

Returns:

  • the tab object which may be further used to control the tab itself.
getSelectedTab() : Tab

Returns selected tab. Returns null if the tab sheet has no tabs.

Returns:

  • selected tab, may be null.
getTab(child* : FormComponent) : Tab

Returns a tab for given child component. Fails if there is no such child component.

Parameters:

  • child the child component of this tab sheet

Returns:

  • the tab object which may be further used to control the tab itself. Never null.
getTab(tabIndex* : Integer) : Tab

Returns a tab for given child component. Fails if there is no such child component.

Parameters:

  • tabIndex the tab index. Tabs are created in the same order as the child components are added to this tab sheet.

Returns:

  • the tab object which may be further used to control the tab itself. Never null.
getTabChangedListener() : {TabChangedEvent : void}

Gets the listener invoked when the current tab is changed

Parameters:

  • the listener or null if none is installed
getTabs() : List<Tab>
removeTab(tab : Tab) : void
Removes tab from tab sheet. Fails if there is no such child component.
setSelectedTab(tab* : Tab) : void

Selects given tab. The tab must belong to this TabSheet. Cannot be null - if the TabSheet has tabs, one must be selected at all times.

Parameters:

  • tab the tab to select, not null.
setSelectedTab(tabIndex* : Integer) : void

Selects tab by its position in tab sheet. Indexing starts at 0. Such tab must exist, the method fails if the argument is either negative or too big.

Parameters:

  • tabIndex index to the tab to select, not null.
setTabChangedListener(listener : {TabChangedEvent : void}) : void

Sets the listener invoked when the current tab is changed.

Parameters:

  • listener the listener, may be null.
toString() : String
Tab
owner : TabSheet
modelingIdDEPRECATED : String

Modeling id of the component. Do not use the field directly, use getModelingId and setModelingId methods instead.

data : Object

Arbitrary data which you can use for any purpose. This field is not used by the Forms framework itself.

icon : Resource
Tab() CONSTRUCTOR
Do not construct tabs directly, use TabSheet.addTab instead.
getCaption() : String

Returns the caption of this tab.

Returns:

  • the caption, may be null for no caption.
getContents() : FormComponent

Returns the content component of this tab. Never null.

Returns:

  • the content component, not null.
getCustomErrorMessage() : String

Gets the tab error message.

Returns:

  • the component error message or null
getDescription() : String

Gets the description for the tab. The description can be used to briefly describe the state of the tab to the user, and is typically shown as a tooltip when hovering over the tab.

Returns:

  • the description for the tab
getIndex() : Integer
getModelingId() : String

Gets the modeling ID of this component.

Returns:

  • the modeling ID
getStyleName() : String

Gets the user-defined CSS style name of the tab. Built-in style names defined in Vaadin or GWT are not returned.

Returns:

  • the style name or of the tab
getUniqueModelingId() : String

Gets html id of this component as rendered on the page or null if there is no direct representation.

Returns:

  • the modeling ID
isEnabled() : Boolean

Returns the enabled status for the tab. A disabled tab is shown as such in the tab bar and cannot be selected.

Returns:

  • true for enabled, false for disabled
isVisible() : Boolean

Returns the visible status for the tab. An invisible tab is not shown in the tab bar and cannot be selected. By default the tab is visible.

Returns:

  • true for visible, false for hidden
refresh() : void
setCaption(caption : String) : Tab

Sets the caption of this tab. The caption is shown in the TabSheet itself.

Parameters:

  • caption the new caption, may be null.
setCustomErrorMessage(errorMessage : String) : void

Sets custom error message to this tab. If the error message is not null, the tab is marked with a red exclamation mark. The error message is visible on mouse over.

Parameters:

  • errorMessage errorMessage the new error message or null
setDescription(description : String) : Tab

Sets the description for the tab. The description can be used to briefly describe the state of the tab to the user, and is typically shown as a tooltip when hovering over the tab.

Parameters:

  • description the new description string for the tab.
setEnabled(enabled* : Boolean) : Tab

Sets the enabled status for the tab. A disabled tab is shown as such in the tab bar and cannot be selected.

Parameters:

  • enabled true for enabled, false for disabled
setIcon(icon : Resource) : Tab

Sets the icon for the tab.

Parameters:

  • icon the icon to set
setModelingId(modelingId : String) : void

Sets the modeling ID of this component.

Parameters:

  • modelingId - modeling id to be set to component
setStyleName(styleName : String) : Tab

Sets a style name for the tab. The style name will be rendered as a HTML class name, which can be used in a CSS definition.

Tab tab = tabsheet.addTab(tabContent, "Tab text");
tab.setStyleName("mystyle");

The used style name will be prefixed with " v-tabsheet-tabitemcell-". For example, if you give a tab the style "mystyle", the tab will get a " v-tabsheet-tabitemcell-mystyle" style. You could then style the component with:

.v-tabsheet-tabitemcell-mystyle {font-style: italic;}

This method will trigger a RepaintRequestEvent on the TabSheet to which the Tab belongs.

Parameters:

  • styleName the new style to be set for tab
setVisible(visible* : Boolean) : Tab

Sets the visible status for the tab. An invisible tab is not shown in the tab bar and cannot be selected, selection is changed automatically when there is an attempt to select an invisible tab.

Parameters:

  • visible true for visible, false for hidden. By default the tab is visible.
toString() : String
MultiSelectList extends AbstractSelect
MultiSelectList() CONSTRUCTOR
Creates a multi select list with no label and simple value holder.
MultiSelectList(caption : String) CONSTRUCTOR

Creates a multi select list with given label and simple value holder.

Parameters:

  • caption the caption
MultiSelectList(caption : String, binding* : Binding) CONSTRUCTOR

Creates a multi select list with given label and given property.

Parameters:

  • caption the caption
  • binding the binding, not null.
MultiSelectList(caption : String, ref* : Reference<Set<Object>>) CONSTRUCTOR

Creates a multi select list with given label, referencing given variable/field.

Parameters:

  • caption the caption
  • ref the reference not null.
getRows() : Integer

Returns the number of rows to show in the list. If the number of rows is set 0, the actual number of displayed rows is determined implicitly by the adapter.

Returns:

  • rows the number of rows to show, 0 or more.
getValue() : Set<Object>
setBinding(ref : Reference<Set<Object>>) : void

Sets the ReferenceValue being displayed by this component. By default a simple value with the initial value of null is displayed. The component is automatically refreshed. If the reference is null, previous reference is cleared and field is empty.

Parameters:

  • ref reference to the new value holder.
setRows(rows* : Integer) : void

Sets the number of rows in the editor. If the number of rows is set 0, the actual number of displayed rows is determined implicitly by the adapter.

Parameters:

  • rows the number of rows to set, 0 or more.
toString() : String
GridLayout extends ComponentGroup
GridLayout() CONSTRUCTOR
Creates a simple 1x1 grid layout with initially no child components.
GridLayout(columns* : Integer, rows* : Integer) CONSTRUCTOR
Creates a empty grid layout of given size.
addComponentToGrid(child* : FormComponent, column* : Integer, row* : Integer) : void

Adds a component to the grid, at given column and row, occupying one cell. Fails if the cell is already occupied by some other component. The grid is automatically enlarged, to accomodate the new component.

Parameters:

  • column zero-based column index, 0 or greater.
  • row zero-based row index, 0 or greater.
addComponentToGrid(child* : FormComponent, column* : Integer, row* : Integer, columnSpan* : Integer, rowSpan* : Integer) : void

Adds a component to the grid, at given column and row. Fails if the cells to be taken are already occupied by some other component. The grid is automatically enlarged, to accomodate the new component.

Parameters:

  • column zero-based column index, 0 or greater.
  • row zero-based row index, 0 or greater.
  • columnSpan number of columns to span over, 1 or greater.
  • rowSpan number of rows to span over, 1 or greater.
getColumnExpandRatio(columnIndex* : Integer) : Decimal

Returns the current column expand ratio. See setColumnExpandRatio() for details.

Parameters:

  • columnIndex zero-based column index, 0 or greater.

Returns:

  • ratio the ratio, 0 or greater. Use null or 0 to disable expand for this column. Defaults to null
getColumns() : Integer
getComponent(column* : Integer, row* : Integer) : FormComponent

Gets the Component at given index.

Parameters:

  • column The column index, starting from 0 for the leftmost column.
  • row The row index, starting from 0 for the topmost row.

Returns:

  • Component in given cell or null if empty
getRowExpandRatio(columnIndex* : Integer) : Decimal

Returns the current row expand ratio. See setRowExpandRatio() for details.

Parameters:

  • columnIndex zero-based row index, 0 or greater.

Returns:

  • ratio the ratio, 0 or greater. Use null or 0 to disable expand for this column. Defaults to null
getRows() : Integer
setColumnExpandRatio(columnIndex* : Integer, ratio : Decimal) : void

Sets the expand ratio of given column. Defaults to null.

The expand ratio defines how excess space is distributed among columns. Excess space means space that is left over from components that are not sized relatively. By default, the excess space is distributed evenly.

Note that the component width of the GridLayout must be defined (fixed or relative, as opposed to undefined) for this method to have any effect.

Parameters:

  • columnIndex zero-based column index, 0 or greater.
  • ratio the ratio, 0 or greater. Use null or 0 to disable expand for this column.
setColumns(columns* : Integer) : void
setRowExpandRatio(columnIndex* : Integer, ratio : Decimal) : void

Sets the expand ratio of given row. Defaults to null.

Expand ratio defines how excess space is distributed among rows. Excess space means the space left over from components that are not sized relatively. By default, the excess space is distributed evenly.

Note, that height of this GridLayout needs to be defined (fixed or relative, as opposed to undefined height) for this method to have any effect.

Note that checking for relative height for the child components is done on the server so you cannot set a child component to have undefined height on the server and set it to 100% in CSS. You must set it to 100% on the server.

Parameters:

  • rowIndex The row index, starting from 0 for the topmost row.
  • ratio the ratio, 0 or greater. Use null or 0 to disable expand for this column. Defaults to null
setRows(rows* : Integer) : void
toString() : String
Table extends AbstractTable
getDataSource() : DataSource

Returns the current table data source.

Returns:

  • the currently set data source. If none has been set yet, this returns null.
getNoDataMessage() : String

Returns:

  • message displayed when no data are available
setColumnOrder(expectedColumnsOrder : List<TableColumn>) : void

Sets a new column order for the table. All columns which are not ordered here will remain in the order they were before as the last columns of table.

Parameters:

  • columnsInOrders the columns in the order they should be
setColumnOrder(expectedColumnsOrder* : TableColumn...) : void

Sets a new column order for the table. All columns which are not ordered here will remain in the order they were before as the last columns of table.

Parameters:

  • columnsInOrders the columns in the order they should be
setDataSource(dataSource : DataSource) : void

Sets a new data source to this table. The table automatically refreshes itself.

Parameters:

  • dataSource the new data source to be shown. May be null - in such case an empty table will be shown.

Returns:

  • this
setNoDataMessage(noDataMessage : String) : void
Sets message displayed inside table body when no data are available.
setRowStyleGenerator(rowStyleGenerator : {Null : String}) : void

Sets the style generator that is used for generating styles for rows. The generator obtains a row objects and returns style name. The CSS class name that will be added to the row is v-table-row-[style name].

Parameters:

  • styleGenerator the row style generator to set, or null to remove a previously set generator
toString() : String
TableColumn

Defines a table column.

To model a column with the "Delete" or "Edit" action link just use the IdentityValueProvider - this way, the link will gain access to the entire Record and can delete it easily.

table : AbstractTable

Filled when the column is assigned to a table. The column may be assigned to at most one table.

valueProvider : ValueProvider

Extracts column values from rows. Not null.

sortable : Boolean

If null or true, allows sorting by this column. Expects the value provider to return Comparable types.

sortValueProvider : ValueProvider

Takes row as a parameter and returns value to be used when sorting by column. If it is null, sort will use value provider.

filtrable : Boolean

If null or true, allows filtering for this column. The filter is auto-generated based on the value type. The auto-generated filter can be configured by the filter configuration provided by the filterConfig attribute.

filterConfig : FilterConfig

Configuration for the auto-generated column filter. If this attribute contains instance of OptionsFilterConfig the filter component is rendered as a combo box or in case of multi-select mode as a multi select list.

filterValueProvider : ValueProvider

Takes row as a parameter and returns value to be used when by column filter. If it is null, filter will use value provider.

generator : {Null : FormComponent}

Creates a component for given row-extracted data. For every table cell a fresh component will be created. This approach is very flexible, but also quite heavyweight, both on the server and on the browser. If possible, use Grid and Renderers - they are way more lightweight.

If the closure is itself null, the value will simply be rendered as a String. If the closure returns null, nothing will be rendered in that particular cell.

modelingIdDEPRECATED : String

Modeling id of the component. Do not use the field directly, use getModelingId and setModelingId methods instead.

data : Object

Arbitrary data which you can use for any purpose. This field is not used by the Forms framework itself.

getAlignment() : Alignment

Returns the current column's child alignment, with respect to the column itself. Defaults to left alignment.

Returns:

  • the alignment, never null.
getComponentInRow(rowItem : Object) : FormComponent

Returns form component rendered in this column in row generated from rowItem. May return null if the row is scrolled out of view or if the column does not have component configured.

Returns:

  • cell form component
getExpandRatio() : Decimal

Returns the current expand ratio.

Returns:

  • the expand ratio, may be null or 0 or higher.
getHeader() : String

Returns the column header for this column. The column must be assigned to a table.

Returns:

  • header the current header, defaults to null.
getHeaderAlignment() : Alignment

Returns the current column's header alignment. Defaults to left alignment.

Returns:

  • the header alignment, never null.
getHeaderStyleName() : String
Gets the style name applied to the header content of this column.
getModelingId() : String

Gets the modeling ID of this component.

Returns:

  • the modeling ID
getUniqueModelingId() : String

Gets html id of this component as rendered on the page or null if there is no direct representation.

Returns:

  • the modeling ID
getWidth() : Decimal

Returns the column width in pixels.

Returns:

  • the column width, may be null.
isCollapsed() : Boolean

Returns whether the specified column is collapsed or not.

Returns:

  • the current column collapsedness. By default the column is not collapsed. Not null.
isCollapsible() : Boolean

Checks if the given column is collapsible. Note that even if this method returns true, the column can only be actually collapsed (via UI or with setColumnCollapsed()) if isColumnCollapsingAllowed() is also true.

Returns:

  • true if the column can be collapsed; false otherwise. Never null.
isSortAscending() : Boolean

Returns true if the table is sorted in ascending order and false if it is sorted in descending order. Can return anything for unsorted columns.

Returns:

  • whether the table is sorted by the specified column
isSorted() : Boolean

Returns whether the table is sorted by the specified column

Returns:

  • whether the table is sorted by the specified column
setAlignment(alignment* : Alignment) : void

Sets the specified column's child component alignment inside of the column. In order for this to work, set the child's width to wrap contents (using FormComponent.setWidthWrap() for example), otherwise the child will just fill the column and there will be no space for the alignment flag to move the child.

Ignores the vertical aspect of the alignment - only the horizontal aspect is applied.

Parameters:

  • alignment the desired alignment, not null. Defaults to left align.
setCollapsed(collapsed* : Boolean) : void

Sets whether the specified column is collapsed or not. Fails if column collapsing is not allowed. By default the column is not collapsed.

Parameters:

  • collapsed the desired collapsedness.
setCollapsible(collapsible* : Boolean) : void

Sets whether the given column is collapsible. Note that collapsible columns can only be actually collapsed (via UI or with setColumnCollapsed()) if isColumnCollapsingAllowed() is true. By default all columns are collapsible.

Parameters:

  • collapsible true if the column should be collapsible, false otherwise.
setExpandRatio(expandRatio : Decimal) : void

Sets the column expand ratio for given column.

Expand ratios can be defined to customize the way how excess space is divided among columns. CustomTable can have excess space if it has its width defined and there is horizontally more space than columns consume naturally. Excess space is the space that is not used by columns with explicit width (see setColumnWidth(Decimal)) or with natural width (no width nor expand ratio).

By default (without expand ratios) the excess space is divided proportionally to columns natural widths.

Only expand ratios of visible columns are used in final calculations.

Column can either have a fixed width or expand ratio. The latter one set is used.

A column with expand ratio is considered to be minimum width by default (if no excess space exists). The minimum width is defined by terminal implementation.

If terminal implementation supports re-sizable columns the column becomes fixed width column if users resizes the column.

Parameters:

  • expandRatio the expandRatio used to divide excess space for this column. May be null or -1.
setHeader(header : String) : void

Sets the column header for this column. The column must be assigned to a table.

Parameters:

  • header the header to set, may be null.
setHeaderAlignment(alignment* : Alignment) : void

Sets the specified column's header alignment.

Ignores the vertical aspect of the alignment - only the horizontal aspect is applied.

Parameters:

  • alignment the desired alignment, not null, Defaults to left align.
setHeaderStyleName(styleName : String) : void

Sets a style name which should be applied to the header content of this column.

Parameters:

  • styleName the name of the style to apply
setModelingId(modelingId : String) : void

Sets the modeling ID of this component.

Parameters:

  • modelingId - modeling id to be set to component
setSorted(sorted* : Boolean) : void

Sets whether the specified column is used for table sort or not. The column will be in ascending order.

Parameters:

  • sorted true if the table should be sorted by this column
setSorted(sorted* : Boolean, ascending* : Boolean) : void

Sets whether the specified column is used for table sort or not and whether it should be ascending or descending.

Parameters:

  • sorted true if the table should be sorted by this column
  • ascending true if the table should be in ascending order, false otherwise
setWidth(width : Integer) : void

Sets columns width (in pixels). Theme may not necessary respect very small or very big values. Setting width to -1 or null (default) means that theme will make decision of width.

Column can either have a fixed width or expand ratio. The latter one set is used. See setExpandRatio().

Parameters:

  • width width to be reserved for colunmns content. May be null.
CheckBoxList extends AbstractSelect
CheckBoxList() CONSTRUCTOR
Creates a multi-select checkbox list with no label and simple value holder.
CheckBoxList(caption : String) CONSTRUCTOR

Creates a multi-select checkbox list with given label and simple value holder.

Parameters:

  • caption the caption
CheckBoxList(caption : String, binding* : Binding) CONSTRUCTOR

Creates a multi-select checkbox list with given label and given property.

Parameters:

  • caption the caption
  • binding the binding, not null.
CheckBoxList(caption : String, ref* : Reference<Set<Object>>) CONSTRUCTOR

Creates a multi-select checkbox list with given label, referencing given variable/field.

Parameters:

  • caption the caption
  • ref the reference not null.
getOrientation() : Orientation

Returns the current orientation.

Returns:

  • the current checkbox list orientation, not null. Default value is vertical.
getValue() : Set<Object>
setBinding(ref* : Reference<Set<Object>>) : void

Sets the ReferenceBinding being displayed by this component. By default an ObjectBinding with the initial value of null is displayed. The component is automatically refreshed.

Parameters:

  • value the new value holder.
setOrientation(orientation* : Orientation) : void

Sets the checkbox list orientation. Default orientation is vertical.

Parameters:

  • orientation whether to lay out checkboxes horizontally or vertically.
toString() : String
RadioButtonList extends AbstractSelect
RadioButtonList() CONSTRUCTOR
Creates a single-select radiobutton list with no label and simple value holder.
RadioButtonList(caption : String) CONSTRUCTOR

Creates a single-select radiobutton list with given label and simple value holder.

Parameters:

  • caption the caption
RadioButtonList(caption : String, binding* : Binding) CONSTRUCTOR

Creates a single-select radiobutton list with given label and given property.

Parameters:

  • caption the caption
  • binding the binding, not null.
RadioButtonList(caption : String, ref* : Reference<Set<Object>>) CONSTRUCTOR

Creates a single-select radiobutton list with given label, referencing given variable/field.

Parameters:

  • caption the caption
  • ref the reference not null.
getOrientation() : Orientation

Returns the current orientation.

Returns:

  • the current checkbox list orientation, not null. Default value is vertical.
getValue() : Object
setBinding(ref : Reference<Set<Object>>) : void

Sets the ReferenceValue being displayed by this component. By default a simple value with the initial value of null is displayed. The component is automatically refreshed. If the reference is null, previous reference is cleared and field is empty.

Parameters:

  • ref reference to the new value holder.
setOrientation(orientation* : Orientation) : void

Sets the radiobutton list orientation. Default orientation is vertical.

Parameters:

  • orientation whether to lay out checkboxes horizontally or vertically.
toString() : String
TextArea extends AbstractTextArea

Shows String values only. Always convertible.

TextArea() CONSTRUCTOR
Creates a text area with no label and simple value holder.
TextArea(caption : String) CONSTRUCTOR

Creates a text area with given label and simple value holder.

Parameters:

  • caption the caption
TextArea(caption : String, binding* : Binding) CONSTRUCTOR

Creates a text area with given label and given binding.

Parameters:

  • caption the caption
  • binding the binding, not null.
TextArea(caption : String, ref* : Reference<String>) CONSTRUCTOR

Creates a text area with given label, referencing given variable/field.

Parameters:

  • caption the caption
  • ref the reference not null.
getMaxRows() : Integer

Returns the maximum allowed number of rows that the textarea in expandable mode will grow to. Default is null that means that there is no limit for growing.

Returns:

  • maximum allowed number of rows for expandable mode
getMinRows() : Integer

Returns the minimum allowed number of rows that the textarea in expandable mode will shrink to.Default is null that means that the limit is 1.

Note: the value is ignored if the textarea is not in expandable mode

Returns:

  • minimum allowed number of rows for expandable mode
getRowsCount() : Integer

Returns the number of rows to shown in the text area when it is in non expandable mode.

Returns:

  • rows the number of rows to show, 0 or more.
isAppendExtraRow() : Boolean

Should last row always be an empty row?

Returns:

  • true if text are in expandable mode adds an extra empty row to the end
isExpandable() : Boolean

Returns:

  • true if the textarea is in expandable mode, false otherwise
setAppendExtraRow(appendExtraRow* : Boolean) : void

Should last row always be an empty row? The value is ignored if the textarea is not in expandable mode. The empty row is added only while scroll bars are not visible, e.g. while text area is exanading. There is no additional empty row if text area already reached max rows size.

Parameters:

  • appendExtraRow true to append extra row, false otherwise
setExpandable(isExpandable* : Boolean) : void

Switch between expandable and normal mode. Textarea in expandable mode grows/shrinks with content within #getMaxRows() and #getMinRows() boundaries.

Parameters:

  • isExpandable
setMaxRows(maxRows* : Integer) : void

Sets the maximum allowed number of rows that the textarea in expandable mode will grow to. Default is null that means that there is no limit for growing.

Note: the value is ignored if the textarea is not in expandable mode

Parameters:

  • maxRows null or number
setMinRows(minRows* : Integer) : void

Sets the minimum allowed number of rows that the textarea in expandable mode will shrink to.

Parameters:

  • minRows null or number
setRowsCount(rows* : Integer) : void

Sets the number of rows in the text area. If the number of rows is 0, the default number determined by the component is used.

Note: the value is ignored if the textarea is in expandable mode

Parameters:

  • rows the number of rows to set, 0 or more.
toString() : String
AbstractTextAreaABSTRACT extends InputComponentWithValue

Shows String values only. Always convertible.

getHint() : String

Gets the hint text - a textual prompt that is displayed when the field would otherwise be empty, to prompt the user for input.

Returns:

  • hint text, initially null.
getMaxLength() : Integer

Returns the maximum number of characters in the field. null is considered unlimited. Terminal may however have some technical limits.

Returns:

  • the maxLength, null if unlimited. null, 0 or greater, never a negative number.
getUserText() : String

Returns:

  • field value as written and currently visible. Unlike getValue method, this returns whatever is in field including invalid values.
getValue() : String

Returns:

  • field value as stored in the binding. Note that only valid values are stored into binding. If any validator returns error, binding is unchanged and this method retuns value in binding. Otherwise said, if the field shows an error after user input, this method returns old correct value.

Use getUserText() method to acquire text as written by user.

setBinding(ref : Reference<String>) : void

Sets the ReferenceValue being displayed by this component. By default a simple value with the initial value of null is displayed. The component is automatically refreshed. If the reference is null, previous reference is cleared and field is empty.

Parameters:

  • ref reference to the new value holder.
setHint(hint : String) : void

Sets the hint text - a textual prompt that is displayed when the field would otherwise be empty, to prompt the user for input. For example "A value in USD, omitting the dollar sign". The hint text is initially null.

Parameters:

  • hint the new hint text, may be null.
setMaxLength(maxLength : Integer) : void

Sets the maximum number of characters in the field. Value -1 is considered unlimited. Terminal may however have some technical limits.

Parameters:

  • maxLength the maxLength to set; setting null or values less than zero will remove any limitation.
CustomDelegateFieldABSTRACT extends CustomField

A custom field where there is a single primary field holding the value, and a couple of other components decorating around the component. Think a date field with a date picker button, a decimal field with a label showing the currency, etc. This class automatically delegates all relevant ComponentWithValue's methods to the primary field, you just need to implement the getDelegate() method which returns the primary field itself.

cdfinitialized : Boolean
CustomDelegateField() CONSTRUCTOR
addValidator(validator* : {Object : String}) : void
focus() : void
getBinding() : Binding
getDelegate() : InputComponentWithValue

Returns the primary field where all data-related calls are delegated to. This method may be called multiple times - it must not create new fields with every call; instead, it must return a single instance. It is recommended to create all UI components in the constructor, store them in private fields and return them here.

Returns:

  • the primary field, not null.
inferValidator(tags : Collection<Tag>) : void
isConvertible() : BooleanDEPRECATED
Deprecated, returns the same thing as #isValid.
isRequired() : Boolean
isValid() : Boolean
refresh() : void
removeAllValidators() : void
setBinding(value : Binding) : void
setOnChangeListener(listener : {ValueChangeEvent : void}) : void
setRequired(required* : Boolean) : void
CustomFieldABSTRACT extends InputComponentWithValue

A ComponentWithValue whose UI content can be constructed by the user, enabling the creation of e.g. form fields by composing Vaadin components. Customization of both the visual presentation and the logic of the field is possible.

It is recommended to create all UI components in the constructor, store them in private fields and return them here.

Subclasses must implement the getContent() method.

It is recommended to override the valueChanged() method to detect the new value and update the inner components accordingly. To set a new value, simply call setValue() on yourself.

initialized : Boolean
CustomField() CONSTRUCTOR
getContents() : FormComponent
refresh() : void
setBinding(value : Binding) : void
setValue(value : Object) : void
valueChanged() : void
Invoked when the Value has been changed programatically, either by calling setValue(), setProperty() or refresh(). Does not detect cases when the property value is changed spuriously. The default implementation does nothing.
InputComponentWithValueABSTRACT extends ComponentWithValue

An editable (and focusable) version of ComponentWithValue. All data-modifying fields inherit from this class.

InputComponentWithValue() CONSTRUCTOR
addValidator(validator* : {Null : String}) : void

Registers given validator to run on the component value; the validator must return a non-null error message when the value is invalid.

Parameters:

  • validator the validator in the form of a closure, not null. This closure will receive the new value on input. If the value is invalid, a non-null String containing the error message must be returned. If the value is valid, null must be returned.
focus() : void
getOnChangeListener() : {ValueChangeEvent : void}

Gets the currently installed value change listener

Returns:

  • the value change event handling closure or null if none is installed
getOnValidValue() : {ValueChangeEvent : void}

Gets the currently installed valid value change listener

Returns:

  • the valid value change event handling closure or null if none is installed
getTabIndex() : Integer
inferValidator(tags : Collection<Tag>) : void

Infers the validator from the binding provided by the Value. Fails if Value.getBinding() returns null.

Parameters:

  • tags may be null. If not null, given collection of tags are applied
isImmediate() : Boolean

Returns the immediate mode of the component.

Certain operations such as adding a value change listener will set the component into immediate mode if #setImmediate(boolean) has not been explicitly called with false.

Returns:

  • true if the component is in immediate mode (explicitly or implicitly set), false if the component if not in immediate mode
isRequired() : Boolean

Checks if the component is visually marked as required to have a value.

Returns:

  • true if true, a non-null value is required to be provided by the user
removeAllValidators() : void
Removes all validators from this component, including the inferred ones.
setImmediate(immediate* : Boolean) : void

Sets the component's immediate mode to the specified status.

Parameters:

  • immediate the boolean value specifying if the component should be in the immediate mode after the call.
setOnChangeListener(listener : {ValueChangeEvent : void}) : void

Sets the value change listener for this component. Only one value change listener may be attached to a component - previous value change listener is automatically unregistered. The component implicitly becomes immediate, unless it was explicitly marked as non-immediate, by calling setImmediate(false).

Parameters:

  • listener the new listener to set. If null, there will be no value change listener registered.
setOnValidValue(listener : {ValueChangeEvent : void}) : void

Sets the valid value change listener for this component. Valid value listener is value was changed and new value is valid (passes all the validators).

Only one value change listener may be attached to a component - previous value change listener is automatically unregistered. The component implicitly becomes immediate, unless it was explicitly marked as non-immediate, by calling setImmediate(false).

Parameters:

  • listener the new listener to set. If null, there will be no value change listener registered.
setRequired(required* : Boolean) : void

If set to true, this component will be visually marked as required but no additional validator is appended to the field.

Parameters:

  • required if true, a non-null value is required to be provided by the user
setTabIndex(tabIndex* : Integer) : void
toString() : String
Repeater extends Form

The Repeater is basically a horizontal or vertical layout.

vertical : Boolean
dataSource : DataSource
childGenerator : {Object : FormComponent}
startIndex : Integer
pageSize : Integer
container : ComponentGroup
childrenWereCreated : Boolean

Prevents multiple initialization when the component is first time rendered. See #refresh method for details

Repeater(childGenerator : {Object : FormComponent}, vertical* : Boolean) CONSTRUCTOR

Creates a repeater which lays out components for every row object vertically or horizontally. Do not forget to set the data source (which will produce row objects for the Repeater), via the #setDataSource() function.

Parameters:

  • childGenerator generates form component for every row object. Accepts row object produced by the data source.
  • vertical if true, the components are nested in a VerticalLayout, if false, the components are nested in HorizontalLayout
createChildren(layout : ComponentGroup) : void
createContainer() : ComponentGroup
createWidget() : FormComponent
getComponentCount() : Integer
getComponents() : List<FormComponent>
getContainer() : ComponentGroup
getDataSource() : DataSource
Returns current data source.
getExpandRatio() : Decimal

Gets the expand ratio which set to the container this repeater generates.

Returns:

  • the expand ratio of the generated container
getModelingId() : String

Gets the modeling ID of this component. This modeling id is set to layout container component upon its creation. Note: if the rendered itself apppears on page multiple times, the rendered id is different. Each copy gets unique suffix.

Returns:

  • the modeling ID
getPageSize() : Integer
Returns page size - how many items are rendered.
getStartIndex() : Integer
Returns index of item the repeater starts rendering from.
getUniqueModelingId() : String

Gets html id of this component as rendered on the page.

Returns:

  • the modeling ID
getWidget() : ComponentGroup
isConvertible() : BooleanDEPRECATED
Deprecated, returns the same thing as #isValid.
isValid() : Boolean
refresh() : void
Refreshes the repeater - re-polls the data source and re-creates all child components.
setDataSource(ds* : DataSource) : Repeater
Sets the data source for this repeater. All child components are automatically re-generated.
setExpandRatio(expandRatio : Decimal) : void

Sets the expand ratio to the container generated by this repeater.

Parameters:

  • expandRatio the expand ratio to set
setModelingId(modelingId : String) : void

Sets the modeling ID of this component. This modeling id is set to layout container component upon its creation. Note: if the rendered itself apppears on page multiple times, the rendered id might not exactly match configured id. Each html component copy gets unique suffix.

Parameters:

  • modelingId - modeling id to be set to component
setPageSize(pageSize : Integer) : void
If set, the repeater renders pageSize items instead of rendering whole datasource.
setStartIndex(startIndex : Integer) : void
If set, the repeater starts rendering from the startIndex-th child. Children at index lower then startIndex are not rendered.
HtmlRenderer extends Renderer

Renders given string as a HTML.

Panel extends SingleComponentContainer

Panel - a simple single component container. Able to scroll its children component.

Panel() CONSTRUCTOR
Panel(caption : String) CONSTRUCTOR
Panel(child : FormComponent) CONSTRUCTOR
Panel(caption : String, child : FormComponent) CONSTRUCTOR
scrollToBottom() : void
scrollToTop() : void
toString() : String
HasChildren

All components marked by this interface may have child components.

getComponentCount() : Integer
Returns the number of child components present in this component.
getComponents() : List<FormComponent>

Returns the child components as a list.

Returns:

  • the list of all child components, not null, may be empty.
refresh() : void
Calls refresh() on all nested components with values.
SingleComponentContainerABSTRACT extends FormComponent

This kind of component may have at most one child.

createWidget() : FormComponent

If there is no content set to this container by the call to #setContent() and this component instance is attached to the screen for the first time, this method is called once to produce the container contents.

This method is particularly helpful when modeling a form which extends a container component: the PDS will override this method, which will now produce the component designed by the user.

Called exactly once, to create the widget contents.

Returns:

  • widget the widget, may be null if you wish the container to have no content. The default implementation just returns null.
getComponentCount() : Integer
getComponents() : List<FormComponent>
getContent() : FormComponent

Returns the current content component.

Returns:

  • current content component or null if none.
isConvertible() : BooleanDEPRECATED
Deprecated, returns the same thing as #isValid.
isValid() : Boolean
Checks whether the child is valid. Returns false only if the child is not valid. If the component does not have a child or the child does not implement Validatable interface, retuns true.
refresh() : void
Calls refresh() on all nested components with values.
setContent(child : FormComponent) : void

Sets the content component of this container. By default the container has no content.

Parameters:

  • child the new content, may be null if the container should have no content.
Collapsible extends SingleComponentContainer

Allows its child to collapse, rendering itself as a thin bar. Upon clicking, the bar is expanded back (uncollapsed) to show the child.

Collapsible() CONSTRUCTOR
Collapsible(caption : String) CONSTRUCTOR
Collapsible(child : FormComponent) CONSTRUCTOR
Collapsible(caption : String, child : FormComponent) CONSTRUCTOR
isCollapsed() : Boolean

Returns the collapsed state of the component. When the component is collapsed, its content is not shown - instead, only a thin bar with the caption is shown. By default the component is not collapsed.

Returns:

  • true if the component is collapsed, false if not.
setCollapsed(collapsed* : Boolean) : void

Sets the collapsed state of the component. When the component is collapsed, its content is not shown - instead, only a thin bar with the caption is shown. By default the component is not collapsed.

Parameters:

  • collapsed true if the component is collapsed, false if not.
toString() : String
Image extends FormComponent
Image() CONSTRUCTOR
Creates a new Image with initially no image shown. Call setSource() to actually show an image.
Image(caption : String) CONSTRUCTOR

Creates a new Image with a caption. Initially, no image is shown - call setSource() to actually show an image.

Parameters:

  • caption the caption to set
Image(resource : DownloadableResource) CONSTRUCTOR
Image(caption : String, resource : DownloadableResource) CONSTRUCTOR
refresh() : void
setSource(resource : DownloadableResource) : void

Sets the image resource. The dimensions are assumed if possible.

Parameters:

  • source the source to set, may be null.
Upload extends FormComponent

Allows the user to upload a file.

onUploadResult : {File, String : void}

Invoked when a file has been uploaded. In case of success, the File will not be null. If the upload failed, the file will be null and the second parameter will be a non null error message.

Upload() CONSTRUCTOR
getAcceptedMimeTypes() : String

Returns the currently accepted mime types. Please see http://www.w3schools.com/tags/att_input_accept.asp for details.

Returns:

  • current mime types, may be null.
getButtonCaption() : String

Returns:

  • String to be rendered into button that fires uploading
getUploadResultListener() : {File, String : void}
Gets the listener which listens to the event of uploaded file.
isImmediate() : Boolean

Returns the immediate mode of the component.

Certain operations such as adding a value change listener will set the component into immediate mode if #setImmediate(Boolean) has not been explicitly called with false.

Returns:

  • true if the component is in immediate mode (explicitly or implicitly set), false if the component if not in immediate mode
isRequired() : Boolean

Indicates whether this component was marked as required.

Returns:

  • true if the component was marked as required.
refresh() : void
setAcceptedMimeTypes(mimeTypes : String) : void

Updates the input accept attribute. This determines which files are visible in Open file dialog by default. Most common mime types are "text/plain" for text files and "application/octet-stream" for binary files or unknown files. Note: this influences the default file selection, but user still can change the Open file dialog filter and submit different kind of file. Server side validation needs to be implemented by modeler.

A list of most common mime-types: https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Complete_list_of_MIME_types

Parameters:

  • mimeTypes the new mime types, for example audio/*,video/*,image/*. Pass null to remove the attribute.
setButtonCaption(caption* : String) : void

In addition to the actual file chooser, upload components have button that starts actual upload progress. This method is used to set text in that button.

The button caption must not be null.

In case the Upload is used in immediate mode using #setImmediate(boolean), the file choose (html input with type "file") is hidden and only the button with this text is shown.

Note the string given is localized by this method and set to the button. HTML formatting is not stripped. Be sure to properly validate your value (including localized version) to your needs.

Parameters:

  • buttonCaption text for upload components button.
setFieldStyle(style* : UploadFieldStyle) : void

Sets how token field looks like: combo box or text field.

Convenience method, does the same thing as calling setImmediate(true) and setImmediate(false).

setImmediate(immediate* : Boolean) : void

Sets the component's immediate mode to the specified status. Setting upload component immediate initiates the upload as soon as a file is selected, instead of the common pattern of file selection field and upload button.

Parameters:

  • immediate the Boolean value specifying if the component should be in the immediate mode after the call.
setRequired(required* : Boolean) : void

Sets the required flag to the upload component.

Parameters:

  • required the value of the required flag
setUploadResultListener(listener : {File, String : void}) : void

Sets the listener which is notified when a file has been uploaded. In case of success, the parameter File will not be null. If the upload failed, the file will be null and the second parameter will be a non null error message.

Parameters:

  • listener the listener
ImageRenderer extends Renderer

Renders an image. The cell value is expected to be a ThemeResource or an ExternalResource. If the cell value is non of the mentioned resource types then it needs to be converted first to one of the mentioned types. The conversion can be done by providing an ImageValueConverter to the 'converter' field.

onClick : {Null : void}

Called when the button is clicked. Receives the business data for given row as input. Closure result is ignored.

converter : ResourceConverter

The converter which converts the cell value to an image resource.

ImageRenderer() CONSTRUCTOR
ImageRenderer(converter : ResourceConverter) CONSTRUCTOR
ImageRenderer(listener : {Null : void}) CONSTRUCTOR
ImageRenderer(converter : ResourceConverter, listener : {Null : void}) CONSTRUCTOR
getClickListener() : {Null : void}
Gets the listener handling the click event.
getConverter() : ResourceConverter

Returns:

  • the renderer's converter
setClickListener(listener : {Null : void}) : void

Sets the click listener which is called when the button is clicked. The listener receives the business data for given row as input. The closure result is ignored.

Parameters:

  • listener the closure handling the click event
setConverter(converter : ResourceConverter) : void

Sets the converter which converts the cell value to an image resource.

Parameters:

  • converter the converter to set
Tree extends InputComponentWithValue
Tree() CONSTRUCTOR
Creates a tree with no label and simple value holder.
Tree(caption : String) CONSTRUCTOR

Creates a single-select-list with given label and simple value holder.

Parameters:

  • caption the caption
Tree(caption : String, binding* : Binding) CONSTRUCTOR

Creates a single-select-list with given label and given binding.

Parameters:

  • caption the caption
  • binding the binding, not null. Must hold Boolean value.
Tree(caption : String, ref* : Reference<Object>) CONSTRUCTOR

Creates a single-select-list with given label, referencing given variable/field.

Parameters:

  • caption the caption
  • ref the reference not null.
setExpand(expand : {Object, Integer : Boolean}) : void

Sets a closure which is used by the tree to decide whether to expand a tree item. The closure receives item's data and the item's depth, and returns true if the item should be expanded or false otherwise. Root items have the depth of 0, their children have the depth of 1, etc.

Parameters:

  • expand the expand predicate closure
setOptionsDataSource(optionValues* : TreeDataSource, caption : ValueProvider) : void

Sets the available options for this Tree to display. The DataSource provides business objects listed in the tree; choosing an item from options will write it to the underlying Value. By default the tree has zero options.

Parameters:

  • optionValues provides options for the tree.
  • caption provides captions for the options items.
toString() : String
MapDisplay extends FormComponent
onClick : {MapClickedEvent : void}

a closure handling the map click

onMarkerClick : {MarkerClickedEvent : void}
onMarkerDrag : {MarkerDraggedEvent : void}
addMarker(marker : MapMarker) : void

Adds a marker to the map.

Parameters:

  • marker
clearMarkers() : void
Removes all markers from the map.
getClickListener() : {MapClickedEvent : void}

Returns:

  • the listener handling map clicks
getMarkerClickListener() : {MarkerClickedEvent : void}

Returns:

  • the listener handling clicks on map markers
getMarkerDragListener() : {MarkerDraggedEvent : void}

Returns:

  • the listener handling drags of map markers
getZoomLevel() : Integer
refresh() : void
removeMarker(marker : MapMarker) : void

Removes the marker from the map.

Parameters:

  • marker the marker to remove
setCenter(coordinates : GeographicCoordinates) : void

Positions the location specified by the coordinates to the map center.

Parameters:

  • coordinates
setCenter(latitude : Decimal, longitude : Decimal) : void

Positions the location specified by [latitude, longitude] to the map center.

Parameters:

  • latitude
  • longitude
setClickListener(listener : {MapClickedEvent : void}) : void

Sets the listener handling map clicks.

Parameters:

  • listener the listener to set
setMarkerClickListener(listener : {MarkerClickedEvent : void}) : void

Sets the listener handling clicks on map markers.

Parameters:

  • listener the listener to set
setMarkerDragListener(listener : {MarkerDraggedEvent : void}) : void
Sets the listener handling drags of map markers.
setZoomLevel(zoomLevel : Integer) : void

Sets the map zoom level.

Parameters:

  • zoomLevel
MapMarker
title : String
popup : String
location : GeographicCoordinates
draggable : Boolean
data : Object

business data

MapClickedEvent extends Event
location : GeographicCoordinates
MarkerClickedEvent extends Event
marker : MapMarker

the marker business data

MarkerDraggedEvent extends Event

This event indicates that a marker has been dragged. The marker's coordinates is updated to the new location. Its co

marker : MapMarker

The marker which has been dragged. Consulting it's location will return the updated value.

TreeTable extends AbstractTable
getDataSource() : TreeDataSource

Returns the current table data source.

Returns:

  • the currently set data source. If none has been set yet, this returns null.
setDataSource(dataSource : TreeDataSource) : void

Sets a new data source to this table. The table automatically refreshes itself.

Parameters:

  • dataSource the new data source to be shown. May be null - in such case an empty table will be shown.

Returns:

  • this
setExpand(expand : {Object, Integer : Boolean}) : void

Sets a closure which is used by the tree table to decide whether to expand a tree item. The closure receives item's data and the item's depth, and returns true if the item should be expanded or false otherwise. Root items have the depth of 0, their children have the depth of 1, etc.

Parameters:

  • expand the expand predicate closure
toString() : String
AbstractTableABSTRACT extends FormComponent

Table is more heavyweight than the Grid, but also more flexible. Instead of a limited Renderer, you can place a full-blown FormComponent into the cells.

addColumn(column* : TableColumn) : TableColumn

Adds a column to this table. You can call this before or after the data source has been set.

Parameters:

  • column the column to add, not null.

Returns:

  • the column, for chaining methods.
addColumn(column* : TableColumn, header* : String) : TableColumn

Adds a column to this table. You can call this before or after the data source has been set.

Parameters:

  • column the column to add, not null.
  • header the column header, not null.

Returns:

  • the column, for chaining methods.
getColumns() : List<TableColumn>
getComponentCount() : Integer

Returns the number of components currently rendered by this table.

Returns:

  • number of contained components.
getComponents() : List<FormComponent>

Returns a list of all components rendered in this table. The order of the returned components is unspecified.

1.) If the datasource contains more rows/pages then is currently visible on page, not yet loaded rows are ignored. 2.) Rows hidden under scroll bar, but still loaded are count as 'rendered'.

Example: if the table contains two columns with modelled component in them, has page size 10 and shows 3 pages, the method will return 2*3*10 = 60 components.

Returns:

  • a list of contained components
getPageLength() : Integer

Returns the current page length. Please see setPageLength() for more information.

Returns:

  • the current page length, not null, 0 or greater.
getSelection() : Object

Returns the currently selected row object. The row was selected either by user clicking on the grid row, or by calling select() programatically. Initially, there is no object selected.

Returns:

  • currently selected row object, null if there is no selection.
isColumnCollapsingAllowed() : Boolean

Checks if column collapsing is allowed.

Returns:

  • true if columns can be collapsed; false otherwise. Defaults to true. Never null.
isColumnReorderingAllowed() : Boolean

Sets whether column reordering is allowed or not - that is, whether the user can drag a column to the new location or not. Defaults to true.

Returns:

  • whether column reordering is allowed or not. Never null.
isFilteringEnabled() : Boolean

Indicates whether the filtering on the table is enabled or not.

Returns:

  • true if the filtering is enabled; otherwise false.
isSelectable() : Boolean
refresh() : void
Refreshes the contents of this table - polls the data source for fresh data.
select(rowObject : Object) : void

Marks an item as selected. Unselects all other items. The row object must have been provided by the DataSource. Only single-selections are supported at the moment. Calling select(null) clears the selection. Fails if the table is not selectable.

Parameters:

  • rowObject select the row for this row object. If null, the selection is cleared.
setColumnCollapsingAllowed(collapsingAllowed* : Boolean) : void

Sets whether column collapsing is allowed or not. By default this value is set to true.

Parameters:

  • collapsingAllowed specifies whether column collapsing is allowed.
setColumnReorderingAllowed(columnReorderingAllowed* : Boolean) : void

Sets whether column reordering is allowed or not - that is, whether the user can drag a column to the new location or not. By default this value is set to true.

Parameters:

  • columnReorderingAllowed specifies whether column reordering is allowed.
setColumnResizeListener(listener : {TableColumn : void}) : void

Sets a column resize listener to this table. Replaces any previously set column resize listener. Setting null will remove any previously set column resize listener.

Parameters:

  • listener the listener which will be notified when a table column resize event occrus
setFilteringEnabled(enabled* : Boolean) : void

Enables/disables the filtering on this table. Disabling the filtering also clears any currently set filter.

Parameters:

  • enabled true to enable the filtering; false to disable the filtering.
setPageLength(pageLength* : Integer) : void

Sets the table page length. This setting influences both the internal row batch fetching size, and the table height:

  • the batch size of items being fetched from server to client by the Table JavaScript component. If the page length is set to 0, all data is fetched from the server upfront.
  • the client-side height of the table, but only when the height is set to null (wrap content). In such case the table shows exactly page-length rows; other items are accessible via the table scrollbar. If the page length is set to 0, the table polls all data and shows them all, with no scrollbar. In this case, the table parent component (or parent's parent) is responsible for correct scrolling.

It is not possible to limit the table height (that is, wrap at most x rows, shrink horizontally when there is less data).

Use-cases:

  • the "slow data source" case - the data source is slow to produce items, and calling it repeatedly would kill the performance. Just set the page length to 0 - this forces the table to load all data, but only once, thus avoiding repeated calls to the data source. In order for the user to be able to scroll the table, you can either set table height explicitly (for example to 300px or 100%) - this way the table itself will show the scrollbar, or you can set the table height to wrap contents and place it inside a panel, or a popup - this way the panel/popup will scroll the table itself.

Parameters:

  • pageLength the new page length, 0 or greater.
setSelectable(selectable* : Boolean) : void
Enables or disables single-row selection for table. The table is not selectable by default.
setSelectionChangeListener(listener : {ValueChangeEvent : void}) : void
Sets or clears the selection change listener. Use getSelection() to query for the current selection.
PositionOptions

Instructs the browser to return only geoposition with e.g. given accuracy or age.

enableHighAccuracy : Boolean

The enableHighAccuracy attribute provides a hint that the application would like to receive the best possible results.

This may result in slower response times or increased power consumption. The user might also deny this capability,

or the device might not be able to provide more accurate results than if the flag wasn't specified.

The intended purpose of this attribute is to allow applications to inform the implementation that they

do not require high accuracy geolocation fixes and, therefore, the implementation can avoid using geolocation

providers that consume a significant amount of power (e.g. GPS). This is especially useful for applications running

on battery-powered devices, such as mobile phones.

If the PositionOptions parameter to getCurrentPosition or watchPosition is omitted, the default value used for the enableHighAccuracy attribute is false.

The same default value is used in ECMAScript when the enableHighAccuracy property is omitted.

timeout : Decimal

The timeout attribute denotes the maximum length of time (expressed in milliseconds) that is allowed to pass from the call

to Forms.detectLocation() until the corresponding resultCallback is invoked. If the implementation is unable to

successfully acquire a new Geoposition before the given timeout elapses, and no other errors have occurred in this interval,

then the corresponding GeolocationEvent.failure must be set with a GeolocationError object whose code attribute is set to GeolocationError.Timeout.

Note that the time that is spent obtaining the user permission is not included in the period covered by the timeout attribute.

The timeout attribute only applies to the location acquisition operation.

If the PositionOptions parameter to Forms.detectLocation() is omitted,

the default value used for the timeout attribute is infinity. If a negative value is supplied, the timeout value is considered to be 0.

The same default value is used in ECMAScript when the timeout property is omitted.

maximumAge : Decimal

The maximumAge attribute indicates that the application is willing to accept a cached position whose age is no greater than the specified time in milliseconds.

If maximumAge is set to 0, the implementation must immediately attempt to acquire a new position object. If an implementation does not have a cached

position available whose age is no greater than the specified maximumAge, then it must acquire a new position object.

If the PositionOptions parameter to Forms.detectLocation() is omitted, the default value used for

the maximumAge attribute is 0. If a negative value is supplied, the maximumAge value is considered to be 0.

The same default value is used in ECMAScript when the maximumAge property is omitted.

Geoposition

Contains details received from browsers HTML5 geolocation request. Note that on some devices selected fields may be null.

The geographic coordinate reference system used by the attributes is the World Geodetic System (2d) aka WGS84 aka EPSG:4326.

Use Forms.detectLocation() to obtain instance of this class.

coordinate : GeographicCoordinates

The geographic position, not null.

accuracy : Decimal

The accuracy of the position information in meters. Not null.

altitude : Decimal

The height of the position, specified in meters above the ellipsoid or null if device cannot provide the information.

altitudeAccuracy : Decimal

The accuracy of the altitude informations in meters or null.

heading : Decimal

Denotes the direction of travel of the hosting device and is specified in degrees, where 0° <= heading < 360°, counting clockwise relative to the true north. Null if device don't support it or it is not moving.

speed : Decimal

The magnitude of the horizontal component of the hosting device's current velocity and is specified in meters per second. If the implementation cannot provide speed information, the value of this attribute must be null. Otherwise, the value of the speed attribute must be a non-negative real number.

GeolocationEventSYSTEM

The GeolocationEvent is fired by the Forms.detectLocation() method after the geographical position of the user has been acquired or when the request for location times out.

position : Geoposition

When a geolocation request succeeds, this value will contain a non-null position.

failure : GeolocatorError

When a geolocation request fails, this field will contain the error cause.

CalendarItem
caption : String

Caption of the calendar item.

startDate : Date

Start date of the calendar item. This attribute is mandatory.

endDate : Date

End date of the calendar item. This attribute is mandatory.

description : String
allDay : Boolean

If true, the calendar item should be rendered as all-day event.

style : String
data : Object

A business data related to this calendar event.

CalendarItemProvider
getItems(startDate : Date, endDate : Date) : List<CalendarItem>

Loads calendar items for the specified date range

Parameters:

  • startDate the start date of the date range
  • endDate the end date of the date range

Returns:

  • a list of calendar items in the target date range
ListCalendarItemProvider
items : List<CalendarItem>
ListCalendarItemProvider(items* : List<CalendarItem>) CONSTRUCTOR

Creates a list based calendar item provider.

Parameters:

  • items a list of items this provider can provide
getItems(startDate : Date, endDate : Date) : List<CalendarItem>
ClosureCalendarItemProvider
closure : {Date, Date : List<CalendarItem>}
ClosureCalendarItemProvider(closure* : {Date, Date : List<CalendarItem>}) CONSTRUCTOR

Creates a new calendar event provider which internally uses the provided closure to obtain calendar entries for a target range

Parameters:

  • closure the closure providing the calendar events
getItems(startDate : Date, endDate : Date) : List<CalendarItem>
Calendar extends FormComponent
onCreateEvent : {CalendarCreateEvent : void}
onEditEvent : {CalendarEditEvent : void}
onRescheduleEvent : {CalendarRescheduleEvent : void}
getCreateListener() : {CalendarCreateEvent : void}
Gets the listener handling calendar create events.
getEditListener() : {CalendarEditEvent : void}
Gets the listener handling calendar edit events.
getRescheduleListener() : {CalendarRescheduleEvent : void}
Gets the listener handling calendar reschedule events.
refresh() : void
Refreshes the content of the calendar.
setCalendarItemProvider(eventProvider : CalendarItemProvider) : void

Sets the calendar item provider to this calendar. The item provider is used to load the calendar items.

Parameters:

  • eventProvider the event provider to set
setCalendarMode(mode : CalendarMode) : void

Sets the calendar mode.

Parameters:

  • mode the calendar mode
setCreateListener(listener : {CalendarCreateEvent : void}) : void

Sets the create listener. The listener is notified when the calendar produces a create event which signals that a new calendar event should be created.

Parameters:

  • listener the listener to set
setEditListener(listener : {CalendarEditEvent : void}) : void

Sets the edit listener. The listener is notified when the calendar produces an edit event which signals that a exiting calendar event should be edited.

Parameters:

  • listener the listener to set
setInitialDate(initialDate : Date) : void

Sets the initial date of the calendar. The initial date is used to determine the date range displayed by the calendar.

Parameters:

  • initialDate the initial date
setRescheduleListener(listener : {CalendarRescheduleEvent : void}) : void

Sets the reschedule listener. The listener is notified when the calendar produces a reschedule event which signals that an existing calendar event should be rescheduled.

Parameters:

  • the listener to set
CalendarCreateEvent extends Event
from : Date
to : Date
allDay : Boolean
CalendarEditEvent extends Event
data : Object
CalendarRescheduleEvent extends Event
from : Date
to : Date
data : Object
Dimension
width : Integer

Width in DIPs.

height : Integer

Height in DIPs.

OrderedComponentGroupABSTRACT extends ComponentGroup

A group of components which explicitly maintains ordering of the child components.

addComponentAt(child* : FormComponent, index* : Integer) : void

Adds a component into indexed position in this container.

Parameters:

  • child the component to be added.
  • index the index of the component position. The components currently in and after the position are shifted forwards.
PasswordField extends AbstractTextArea
PasswordField() CONSTRUCTOR
Creates a text field with no label and simple value holder.
PasswordField(caption : String) CONSTRUCTOR

Creates a text field with given label and simple value holder.

Parameters:

  • caption the caption
PasswordField(caption : String, binding* : Binding) CONSTRUCTOR

Creates a text field with given label and given binding.

Parameters:

  • caption the caption
  • binding the binding, not null.
PasswordField(caption : String, ref* : Reference<String>) CONSTRUCTOR

Creates a text field with given label, referencing given variable/field.

Parameters:

  • caption the caption
  • ref the reference not null.
toString() : String
ClosureBinding

A read-only binding with the value wrapped in a closure that is evaluated every time the get() method is called.

closure : { : Object}

Called when get() is called. Never null.

ClosureBinding(closure* : { : Object}) CONSTRUCTOR
Creates the binding with the value se to the closure.
get() : Object

Returns the value of the ClosureBinding.

Returns:

  • Binding value
getBinding() : RecordAndProperty

Returns null since the binding is not a record and property.

Returns:

  • null null return value for ClosureBinding
set(value : Object) : void

Returns an error since the value of the ClosureBinding is read-only.

Returns:

  • error
DateRenderer extends Renderer
formatPattern : String

The date format pattern. For the format pattern syntax see http://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html

DateRenderer() CONSTRUCTOR
DateRenderer(formatPattern : String) CONSTRUCTOR
getFormatPattern() : String

Returns:

  • the format pattern used by this renderer.
setFormatPattern(formatPattern : String) : void

Sets the date format pattern. For the format pattern syntax see http://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html

Parameters:

  • formatPattern the date format pattern for this renderer
NumberRenderer extends Renderer
formatPattern : String

The number format pattern. For the format pattern syntax see https://docs.oracle.com/javase/7/docs/api/java/text/DecimalFormat.html.

NumberRenderer() CONSTRUCTOR
NumberRenderer(formatPattern : String) CONSTRUCTOR
getFormatPattern() : String

Returns:

  • the format pattern used by this renderer.
setFormatPattern(formatPattern : String) : void

Sets the number format pattern. For the format pattern syntax see https://docs.oracle.com/javase/7/docs/api/java/text/DecimalFormat.html.

Parameters:

  • formatPattern the number format pattern for this renderer
EnumerationRenderer extends Renderer

Renderes given enumeration value as a string.

Download extends FormComponent

Allows to download a resource. It can be rendered as a Button or a Link depending on the style which is set.

Download() CONSTRUCTOR
A constructor used for custom components.
Download(caption* : String, resource* : DownloadableResource, style : DownloadStyle) CONSTRUCTOR

Creates a new download componet with the given caption, resource and style.

Parameters:

  • caption the caption of the download component
  • resource the downloadable resource
  • style specifies whether the download component is rendered as a hyperlink (default), or as a button.
refresh() : void
setResource(resource* : DownloadableResource) : void
setStyle(style : DownloadStyle) : void
DashboardUpdateEvent extends Event
widget : GSDashboardWidget
newPosition : Rect
newState : WidgetState
TabChangedEvent extends Event

Fired when the selected tab is changed in the TabSheet. This event is fired both by user (when the user clicks through the tabs) and programatically (for example when adding tab to an empty tab sheet).

Event
source : FormComponent
ClickEvent extends Event
x : Integer
y : Integer
PopupCloseEvent extends Event
closeButton : Boolean

True if the popup was closed via close button on the popup. False if the popup was closed programmatically or if the app navigated away.

ValueChangeEvent extends Event
oldValue : Object
ActionLink extends FormComponent

A simple action link which is similar to a Button - that is, it has a click listener.

onClick : {ClickEvent : void}

Called when the button is clicked. Only one click listener may be attached.

ActionLink() CONSTRUCTOR
Creates an action link with an empty caption.
ActionLink(caption* : String) CONSTRUCTOR

Creates an action link with given caption. Clicking on the link does nothing - change the #onClick closure to register the click listener.

Parameters:

  • caption the caption shown on the link itself, not null.
ActionLink(caption* : String, clickListener* : {ClickEvent : void}) CONSTRUCTOR

Creates an action link with given caption and given click listener.

Parameters:

  • caption the caption shown on the action link itself, not null.
  • clickListener called when the action link is clicked.
focus() : void
getCaptionMode() : CaptionMode

Checks whether captions are rendered as HTML

The default is false, i.e. to render that caption as plain text.

Returns:

  • true if the captions are rendered as HTML, false if rendered as plain text
getClickListener() : {ClickEvent : void}

Returns:

  • the listener handling clicks
getTabIndex() : Integer
refresh() : void
setCaptionMode(captionAsHtml* : CaptionMode) : void

Sets whether the caption is rendered as HTML.

If set to true, the captions are rendered in the browser as HTML and the developer is responsible for ensuring no harmful HTML is used. If set to false, the caption is rendered in the browser as plain text.

The default is false, i.e. to render that caption as plain text.

Parameters:

  • captionAsHtml true if the captions are rendered as HTML, false if rendered as plain text
setClickListener(listener : {ClickEvent : void}) : void

Sets the listener for the click events.

Parameters:

  • listener the listener to set
setTabIndex(tabIndex* : Integer) : void
toString() : String
Focusable

A component which may receive keyboard focus.

focus() : void
Sets the focus to this component.
getTabIndex() : Integer

Gets the tabulator index of the Focusable component.

Returns:

  • tab index set for the Focusable component
setTabIndex(tabIndex* : Integer) : void

Sets the tabulator index of the Focusable component. The tab index property is used to specify the order in which the fields are focused when the user presses the Tab key. Components with a defined tab index are focused sequentially first, and then the components with no tab index.

After all focusable user interface components are done, the browser can begin again from the component with the smallest tab index, or it can take the focus out of the page, for example, to the location bar.

If the tab index is not set (is set to zero), the default tab order is used. The order is somewhat browser-dependent, but generally follows the HTML structure of the page.

A negative value means that the component is completely removed from the tabulation order and can not be reached by pressing the Tab key at all.

Parameters:

  • tabIndex the tab order of this component. Indexes usually start from 1. Zero means that default tab order should be used. A negative value means that the field should not be included in the tabbing sequence.
Button extends FormComponent

A simple button.

onClick : {ClickEvent : void}

Called when the button is clicked. Only one click listener may be attached.

Button() CONSTRUCTOR
Creates a button with no caption. Clicking on the button does nothing - change the #onClick closure to register the click listener.
Button(caption* : String) CONSTRUCTOR

Creates a button with given caption. Clicking on the button does nothing - change the #onClick closure to register the click listener.

Parameters:

  • caption the caption shown on the button itself, not null.
Button(caption* : String, clickListener* : {ClickEvent : void}) CONSTRUCTOR

Creates a button with given caption and given click listener.

Parameters:

  • caption the caption shown on the button itself, not null.
  • clickListener called when the button is clicked.
focus() : void
getCaptionMode() : CaptionMode

Checks whether captions are rendered as HTML

The default is false, i.e. to render that caption as plain text.

Returns:

  • true if the captions are rendered as HTML, false if rendered as plain text
getClickListener() : {ClickEvent : void}

Returns:

  • the listener handling clicks
getTabIndex() : Integer
refresh() : void
removeClickShortcut() : void
Removes the keyboard shortcut previously set with #setClickShortcut(KeyCode, ModifierKey...).
setCaptionMode(captionAsHtml* : CaptionMode) : void

Sets whether the caption is rendered as HTML.

If set to true, the captions are rendered in the browser as HTML and the developer is responsible for ensuring no harmful HTML is used. If set to false, the caption is rendered in the browser as plain text.

The default is false, i.e. to render that caption as plain text.

Parameters:

  • captionAsHtml true if the captions are rendered as HTML, false if rendered as plain text
setClickListener(listener : {ClickEvent : void}) : void

Sets the listener for the click events.

Parameters:

  • listener the listener to set
setClickShortcut(keyCode : KeyCode, modifiers : ModifierKey...) : void

Makes it possible to invoke a click on this button by pressing the given KeyCode and (optional) ModifierKeys. The shortcut is global (bound to the containing Window).

Parameters:

  • keyCode the keycode for invoking the shortcut
  • modifiers the (optional) modifiers for invoking the shortcut, null for none
setTabIndex(tabIndex* : Integer) : void
toString() : String
Link extends FormComponent

The Link component differs to ActionLink in that it does not have a click listener - instead, it can only navigate the user to a particular URL. However, it is able to open the link in a new window.

getCaptionMode() : CaptionMode

Checks whether captions are rendered as HTML

The default is false, i.e. to render that caption as plain text.

Returns:

  • true if the captions are rendered as HTML, false if rendered as plain text
isOpensNewWindow() : Boolean

Returns:

  • whether the link will be opened in this tab, new tab/window or whether it depends on navigation object
refresh() : void
setCaptionMode(captionAsHtml* : CaptionMode) : void

Sets whether the caption is rendered as HTML.

If set to true, the captions are rendered in the browser as HTML and the developer is responsible for ensuring no harmful HTML is used. If set to false, the caption is rendered in the browser as plain text.

The default is false, i.e. to render that caption as plain text.

Parameters:

  • captionAsHtml true if the captions are rendered as HTML, false if rendered as plain text
setNavigation(navigation : Navigation) : void

Configures this link to perform given navigation upon clicking.

Parameters:

  • navigation perform this navigation upon clicking.
setOpensNewWindow(opensNewWindow : Boolean) : void

Sets whether the link should open in new tab/window or not. Overrides the openNewTab property in navigation object. If the value is:

  • null - (default) the behavior depends on the value of openNewTab property of navigation object
  • true - the link is opened in tab/window regardless of openNewTab property
  • false - the link is opened in this tab regardless of openNewTab property

Parameters:

  • opensNewWindow specifies whether the link should open in new tab or this window
setUrl(url : String) : void

Configures this link to navigate to given URL.

Parameters:

toString() : String
ContextClickEvent extends Event
MenuItem

An item in the context menu.

onClick : { : void}

The menu item click handler.

caption : String

The caption of the menu item.

icon : Resource
htmlClass : String
subMenu : List<MenuItem>
TokenField extends InputComponentWithValue
TokenField() CONSTRUCTOR
Creates a token field with no label and simple value holder.
TokenField(caption : String) CONSTRUCTOR

Creates a token field with given label and simple value holder.

Parameters:

  • caption the caption
TokenField(caption : String, binding* : Binding) CONSTRUCTOR

Creates a token field with given label and given property.

Parameters:

  • caption the caption
  • binding the binding, not null.
TokenField(caption : String, ref* : Reference<Collection<Object>>) CONSTRUCTOR

Creates a token field with given label, referencing given variable/field.

Parameters:

  • caption the caption
  • ref the reference not null.
getValue() : Collection<Object>
isExcludeSelectedTokens() : Boolean

Returns:

  • true if the field shows selected tokens among its suggestions, false otherwise.
setBinding(ref : Reference<Collection<Object>>) : void

Sets the ReferenceValue being displayed by this component. By default a simple value with the initial value of null is displayed. The component is automatically refreshed. If the reference is null, previous reference is cleared and field is empty.

Parameters:

  • ref reference to the new value holder.
setExcludeSelectedTokens(excludeSelectedTokens* : Boolean) : void

Configures whether token field should show selected tokens from the user.

Parameters:

  • excludeSelectedTokens - if it is true, token field will NOT show selected tokens among suggestions. If it is false, selected token fields will be suggested.
setFieldStyle(fieldStyle : TokenFieldStyle) : void
Sets how token field looks like: combo box or text field.
setOptions(options* : Collection<SelectItem>) : void

Sets a constant list of options to be shown in this select component. Choosing an item from options will write SelectItem.value to the underlying Value. By default the select has zero options.

Parameters:

  • options a collection of options, not null.
setOptions(options* : Collection<Object>) : void

Sets a constant list of options to be shown in this select component. The caption is computed by calling toString on the object. By default the select has zero options.

Parameters:

  • options a collection of options, not null.
setOptions(options* : Map<Object, String>) : void

Sets a constant list of options to be shown in this select component. Choosing an item from the map will write the map's key to the underlying Value. By default the select has zero options.

Parameters:

  • options a map of options, not null. Maps possible values to captions.
setOptionsDataSource(optionValues* : DataSource, caption* : ValueProvider) : void

Sets the available options for this selector to display. The DataSource provides business objects listed in the selector; choosing an item from options will write it to the underlying Value. By default the selector has zero options.

Parameters:

  • optionValues provides available options for the selector. The DataSource is not asked to sort items - use DataSource.withSort() for that.
  • caption provides captions for the options items.
toString() : String
RichTextArea extends InputComponentWithValue
RichTextArea() CONSTRUCTOR
Creates a rich text area with no label and simple value holder.
RichTextArea(caption : String) CONSTRUCTOR

Creates a rich text area with given label and simple value holder.

Parameters:

  • caption the caption
RichTextArea(caption : String, binding* : Binding) CONSTRUCTOR

Creates a rich text area with given label and given binding.

Parameters:

  • caption the caption
  • binding the binding, not null.
RichTextArea(caption : String, ref* : Reference<String>) CONSTRUCTOR

Creates a rich text area with given label, referencing given variable/field.

Parameters:

  • caption the caption
  • ref the reference not null.
getUserText() : String

Returns:

  • field value as written and currently visible. Unlike getValue method, this returns whatever is in field including invalid values.
toString() : String
FilterConfig
filterId : Object

Filters generated from this config will be assigned this id.

OptionsFilterConfig extends FilterConfig

A configuration of a filter providing a set of options.

options : List<SelectItem>

Options to allow to filter by.

selected : List<SelectItem>

Allows to set the pre-selected options to filter by when filter is set from model.

multiselect : Boolean

Whether to allow to filter by multiple selected options.

popupRows : Integer

Number of visible rows in drop down list. If it is 0 or null, the framework will determine number of rows automatically.

DateFilterConfig extends FilterConfig

A configuration for the date filter.

lessThan : Date

Less than date.

moreThan : Date

More than date.

resolution : DateTimeResolution
formatPattern : String

The format pattern as specified by the java.text.SimpleDateFormat. This value is optional.

RegExpFilterConfig extends FilterConfig

A configuration for the regular expression filter.

pattern : String

The pattern (java.util.regex.Pattern).

SubstringFilterConfig extends FilterConfig

A configuration for the substring filter.

substring : String

The substring to filter by.

NumericFilterConfig extends FilterConfig

A configuration for the numeric filter.

lessThan : Decimal

Less than value.

equal : Decimal

Equal value.

moreThan : Decimal

More than value.

CssLayout extends OrderedComponentGroup
PdfViewer extends FormComponent
PdfViewer() CONSTRUCTOR
Creates an empty viewer which initially shows nothing (null).
refresh() : void
setRestorePdfStateOnLoad(restoreLastPdfState* : Boolean) : void

By default, pdf viewer remembers last opened page, zoom, scroll position and sidebar position for each opened pdf. When the same pdf is opened second time in the same browser, it is opened at last read page. This method is able to turn on/off this functionality.

Parameters:

  • restoreLastPdfState - if false, pdf will be opened on the first page with default settings regardless of where it was opened last time.
setSource(resource : FileResource) : void

Sets the pdf resource.

Parameters:

  • source the source to set, may be null.
DropZone extends SingleComponentContainer
onUploadResult : {List<File>, List<String> : void}

Invoked when a file has been uploaded. In case of success, the File will not be null. If the upload failed, the file will be null and the second parameter will be a non null error message.

getUploadResultListener() : {List<File>, List<String> : void}
Gets the listener which listens to the event of uploaded file.
isDropEnabled() : Boolean
setDropEnabled(enable* : Boolean) : void

Enables and disables dropzone. If the parameter is false, dropzone wont accept any files.

Parameters:

  • enable true it the dropzone should accept files, false otherwise
setMaxFiles(maxFiles : Integer) : void

Maximum amount of files that have to be dropped into dropzone at once.

Parameters:

  • *maxFiles* dropzone will accept less then this amount of files
setMinFiles(minFiles : Integer) : void

Minimum amount of files that have to be dropped into dropzone at once.

Parameters:

  • *minFiles* dropzone will accept less then this amount of files
setUploadResultListener(listener : {List<File>, List<String> : void}) : void

Sets the listener which is notified when all dropped files have been uploaded. The parameter List\<File\> contains list of all succesfully uploaded files. Failures are collected in the List\<String\> parameter.

Parameters:

  • listener the listener
SearchComboBox extends AbstractComboBox
SearchComboBox() CONSTRUCTOR
Creates a search combobox with no label and simple value holder.
SearchComboBox(caption : String) CONSTRUCTOR

Creates a search combobox with given label and simple value holder.

Parameters:

  • caption the caption
SearchComboBox(caption : String, binding* : Binding) CONSTRUCTOR

Creates a search combobox with given label and given property.

Parameters:

  • caption the caption
  • property the property, not null. Must hold Boolean value.
SearchComboBox(caption : String, ref* : Reference<Object>) CONSTRUCTOR

Creates a search combobox with given label, referencing given variable/field.

Parameters:

  • caption the caption
  • ref the reference not null.
getFilterTimeout() : Integer

Search combo-box does not refresh drop down content until user stopped typing for timeout milliseconds.

Returns:

  • expected pause in typing before the combo-box search for data
getHint() : String

Gets the hint text - a textual prompt that is displayed when the field would otherwise be empty, to prompt the user for input.

Returns:

  • hint text, initially null.
getMinimalFilterLength() : Integer

The minimal length the text typed into the combo box must have in order to be used for filtering. Text longer then minFilterLength is used as a filter for drop down options - only options containing typed substring are available.

Shorter text typed into the combo-box is ignored and all options are shown.

Returns:

  • minimal filter length
getPageLength() : Integer

Gets the page length (the number of options shown in the suggestion popup). Zero disables paging and shows all items. Default value is 10.

Parameters:

  • pageLength the new page length, 0 or greater.
isCaseSensitive() : Boolean

Returns:

  • whether the field is in case sensitive or case insensitive mode.
setCaseSensitive(caseSensitive : Boolean) : SearchComboBox

Set the filter into either case sensitive or case insensitive mode.

Parameters:

  • caseSensitive
setFilterTimeout(timeout : Integer) : SearchComboBox

Search combo-box does not refresh drop down content until user stopped typing for timeout milliseconds.

Parameters:

  • timeout
setHint(hint : String) : void

Sets the hint text - a textual prompt that is displayed when the field would otherwise be empty, to prompt the user for input. For example "A value in USD, omitting the dollar sign". The hint text is initially null.

Parameters:

  • hint the new hint text, may be null.
setMinimalFilterLength(minFilterLength : Integer) : SearchComboBox

The minimal length the text typed into the combo box must have in order to be used for filtering. Text longer then minFilterLength is used as a filter for drop down options - only options containing typed substring are available.

Shorter text typed into the combo-box is ignored and all options are shown.

Parameters:

  • minFilterLength - minimal length of filter
setPageLength(pageLength* : Integer) : SearchComboBox

Sets the page length (the number of options shown in the suggestion popup). Setting this to zero disables paging and shows all items. Default value is 10.

Parameters:

  • pageLength the new page length, 0 or greater.
toString() : String
MultiselectComboBox extends AbstractSelect
MultiselectComboBox() CONSTRUCTOR
Creates a combobox with no label and simple value holder.
MultiselectComboBox(caption : String) CONSTRUCTOR

Creates a combobox with given label and simple value holder.

Parameters:

  • caption the caption
MultiselectComboBox(caption : String, binding* : Binding) CONSTRUCTOR

Creates a combobox with given label and given property.

Parameters:

  • caption the caption
  • property the property, not null. Must hold Boolean value.
MultiselectComboBox(caption : String, ref* : Reference<Object>) CONSTRUCTOR

Creates a combobox with given label, referencing given variable/field.

Parameters:

  • caption the caption
  • ref the reference not null.
getHint() : String

Gets the hint text - a textual prompt that is displayed when the field would otherwise be empty, to prompt the user for input.

Returns:

  • hint text, initially null.
getPageLength() : Integer

Gets the page length (the number of options shown in the suggestion popup). Zero disables paging and shows all items. Default value is 10.

Parameters:

  • pageLength the new page length, 0 or greater.
getValue() : Set<Object>
setHint(hint : String) : void

Sets the hint text - a textual prompt that is displayed when the field would otherwise be empty, to prompt the user for input. For example "A value in USD, omitting the dollar sign". The hint text is initially null.

Parameters:

  • hint the new hint text, may be null.
setPageLength(pageLength* : Integer) : MultiselectComboBox

Sets the page length (the number of options shown in the suggestion popup). Setting this to zero disables paging and shows all items. Default value is 10.

Parameters:

  • pageLength the new page length, 0 or greater.
toString() : String
SplitPanelABSTRACT extends FormComponent

SplitPanel is a two component container that divides the available space into two areas. The split can be made either vertically where one component is above another or horizontally where they are side-by-side. The components are divided by a splitter bar which can be dragged to adjust their relative sizes.

onSplitPositionChanged : {SplitPositionChanged : void}
getComponentCount() : Integer
getComponents() : List<FormComponent>
getFirstComponent() : FormComponent
Returns first component of this split panel. Depending on the direction the first component is either at the top one or on the left.
getMaxSplitPosition() : Decimal

Returns the current maximum position of the splitter, in #getMaxSplitPositionUnit() units.

Returns:

  • the maximum position of the splitter
getMaxSplitPositionUnit() : SizeUnit

Returns the unit of the maximum position of the splitter

Returns:

  • the unit of the maximum position of the splitter
getMinSplitPosition() : Decimal

Returns the current minimum position of the splitter, in #getMinSplitPositionUnit() units.

Returns:

  • the minimum position of the splitter
getMinSplitPositionUnit() : SizeUnit

Returns the unit of the minimum position of the splitter.

Returns:

  • the unit of the minimum position of the splitter
getSecondComponent() : FormComponent
Returns second component of this split panel. Depending on the direction the second component is either at the bottom one or on the right.
getSplitPosition() : Decimal

Returns the current position of the splitter, in #getSplitPositionUnit() units.

Returns:

  • position of the splitter
getSplitPositionUnit() : SizeUnit
Returns the unit of position of the splitter.
isConvertible() : BooleanDEPRECATED
Deprecated, returns the same thing as #isValid.
isLocked() : Boolean

Is the SplitPanel handle locked (user not allowed to change split position by dragging).

Returns:

  • true if locked, false otherwise.
isSplitPositionReversed() : Boolean

Is the split position reversed. By default the split position is measured by the first region, but if split position is reversed the measuring is done by the second region instead.

Returns:

  • true if reversed, false otherwise.
isValid() : Boolean
Checks whether both child values are valid. Returns false only if one of them is validatable and not valid. If the child does not exist (one side of the panel is empty) or if one child does not implement Validatable interface, retuns true.
isValidChild(child : FormComponent) : Boolean
refresh() : void
Calls refresh() on all nested components with values.
setFirstComponent(child : FormComponent) : void

Sets the first component of this split panel. Depending on the direction the first component is shown at the top or to the left.

Parameters:

  • c The component to use as first component
setLocked(locked : Boolean) : void

Lock the SplitPanels position, disabling the user from dragging the split handle.

Parameters:

  • locked Set true if locked, false otherwise.
setMaxSplitPosition(position : Decimal, unit : SizeUnit) : void

Sets the maximum split position to the given position and unit. If the split position is reversed, maximum and minimum are also reversed.

Parameters:

  • pos the maximum position of the split
  • unit the unit (from Sizeable) in which the size is given. Allowed units are UNITS_PERCENTAGE and UNITS_PIXELS
setMinSplitPosition(position : Decimal, unit : SizeUnit) : void

Sets the minimum split position to the given position and unit. If the split position is reversed, maximum and minimum are also reversed.

Parameters:

  • pos the minimum position of the split
  • unit the unit (from Sizeable) in which the size is given. Allowed units are UNITS_PERCENTAGE and UNITS_PIXELS
setSecondComponent(child : FormComponent) : void

Sets the second component of this split panel. Depending on the direction the second component is shown at the bottom or to the right.

Parameters:

  • c The component to use as second component
setSplitPosition(position : Decimal, unit : SizeUnit) : void

Moves the position of the splitter with given position and unit.

Parameters:

  • pos the new size of the first region. Fractions are only allowed when unit is percentage.
  • unit the unit (from Sizeable) in which the size is given.
setSplitPosition(position : Decimal, unit : SizeUnit, reverse : Boolean) : void

Moves the position of the splitter with given position and unit and sets reverse property of the component.

Parameters:

  • pos the new size of the first region. Fractions are only allowed when unit is percentage.
  • unit the unit (from Sizeable) in which the size is given.
  • reverse Puts the component into reverse mode. If set to true the split splitter position is measured by the second region else it is measured by the first region.

    Note: this affects also previously set minSplitPosition and maxSplitPosition properties.

setSplitPositionChangedListener(listener : {SplitPositionChanged : void}) : void

Sets the listener for the split position changes. The listener is invoked for both user actions and programmatic actions.

Parameters:

  • listener the listener to set
HorizontalSplitPanel extends SplitPanel

HorizontalSplitPanel is a two component container that divides the available space into two areas. The components are side-by-side - first component is on the left and second component is on the right. They are divided by a splitter bar which can be dragged to adjust their relative sizes.

VerticalSplitPanel extends SplitPanel

VerticalSplitPanel is a two component container that divides the available space into two areas. The components are above each other - first component is on the top and second component is on the bottom. They are divided by a splitter bar which can be dragged to adjust their relative sizes.

Accordion extends TabSheet

Accordion is vertical tab sheet.

AbstractComboBoxABSTRACT extends AbstractSelect

An abstract record that represents a combo-box forms component.

setNewItemHandler(itemProvider : {String : Object}) : void

Enables or disables whether the user can enter an undefined option.

The itemProvider converts the user input from the text field to an option value. The returned object is set as the combo-box value and can be retrieved with the getValue method. It is selected in the combo box but does not appear in the drop-down list with options. If the user unselects the value, the value dissappears from the combo.

The label for the new item is generated by the caption provider supplied via the setOptions(Collection<SelectItem> options*, ValueProvider caption) method. If not supplied, the result item's toString method is used.

If the itemProvider parameter is null, the user can use only a defined option: the value written into the field is used to filter the options.

setOptions(options* : Collection<Object>, caption* : ValueProvider) : void

Convenience method that calls #setOptions(Collection<SelectItem> options*, ValueProvider caption).

Parameters:

  • options values of the SelectItem objects
  • caption generator of labels for new select items
setOptions(options* : Collection<SelectItem>, caption : ValueProvider) : void

Sets the options of the select component.

When the user selects an item from the options, the option value is written to the underlying Value.

The caption provider generates captions for those items that are not in the options collection. Such items are created either with the setValue method from the model or when the user enters a new option value to the select component (this is allowed when the new-item handler was previously defined with the setNewItemHandler method).

Parameters:

  • options collection with the options; must not be null.
  • caption generator of labels for the select items that are not in the options.
setOptions(options* : Map<Object, String>, captionProvider : ValueProvider) : void

Sets the options of the select component.

When the user selects an item from the options, the option value is written to the underlying Value.

The caption provider generates captions for those items that are not in the options collection. Such items are created either with the setValue method from the model or when the user enters a new option value to the select component (this is allowed when the new-item handler was previously defined with the setNewItemHandler method).

Parameters:

  • options collection of options; must not be null.
  • captionProvider generator of labels for select items that are not in the options.
SplitPositionChanged extends Event
position : Decimal

New split position.

unit : SizeUnit

Unit in which split position is reported.

isReversed : Boolean

Returns true if originating split panel is in reverse mode. Reverse mode true means that the split splitter position is measured by the second region, false means it is measured by the first region.

getPosition() : Decimal
getUnit() : SizeUnit
isReversed() : Boolean
BooleanFilterConfig extends FilterConfig

A configuration for the boolean filter.

value : Boolean

Default value set to filter field.

disableIndeterminateState : Boolean

If <code>true</code>, user wont be able to set filter to indeterminate state (when both <code>true</code> and <code>false</code> value passes the filter). It is still possible to set the default filter value to indeterminate.

caption : String

The checkbox filter field caption.

Refresheable
refresh() : void
Slider extends InputComponentWithValue

A component for selecting a numerical value within a range. User moves a slider on a scale by mouse instead of writing textual values.

Slider() CONSTRUCTOR
Creates a slider with no label and simple value holder.
Slider(caption : String) CONSTRUCTOR

Creates a slider with given label and simple value holder.

Parameters:

  • caption the caption
Slider(caption : String, binding* : Binding) CONSTRUCTOR

Creates a slider with given label and given property.

Parameters:

  • caption the caption
  • binding the binding, not null. Must hold Boolean value.
Slider(caption : String, ref* : Reference<Decimal>) CONSTRUCTOR

Creates a slider with given label, referencing given variable/field.

Parameters:

  • caption the caption
  • ref the reference not null.
getDecimalPlaces() : Integer

Returns:

  • The number of digits after the decimal point.
getMax() : Decimal

Returns:

  • maximal value on the slider
getMin() : Decimal

Returns:

  • minimal value on slider
getValue() : Decimal
setDecimalPlaces(resolution* : Integer) : void
Sets number of digits after the decimal point.
setMax(max* : Decimal) : void
Set maximal value of the slider.
setMin(min* : Decimal) : void
Set minimal value of the slider.
setOrientation(orientation* : Orientation) : void
Sets sliders orientation - either horizontal or vertical.
setProperty(ref* : Reference<Decimal>) : void

Sets the ReferenceValue being displayed by this component. By default a simple value with the initial value of ????? is displayed. The component is automatically refreshed.

Parameters:

  • value the new value holder.
toString() : String
LocalDateField extends InputComponentWithValue
LocalDateField() CONSTRUCTOR
Creates a local date field with no label and simple value holder.
LocalDateField(caption : String) CONSTRUCTOR

Creates a local date field with given label and simple value holder.

Parameters:

  • caption the caption
LocalDateField(caption : String, binding* : Binding) CONSTRUCTOR

Creates a local date field with given label and given property.

Parameters:

  • caption the caption
  • binding the binding, not null. Must hold LocalDate value.
LocalDateField(caption : String, ref* : Reference<LocalDate>) CONSTRUCTOR

Creates a local date field with given label, referencing given variable/field.

Parameters:

  • caption the caption
  • ref the reference not null.
getUserText() : String

Returns:

  • field value as written and currently visible. Unlike getValue method, this returns whatever is in field including invalid or unparseable values.
getValue() : LocalDate
setBinding(ref : Reference<LocalDate>) : void

Sets the ReferenceValue being displayed by this component. By default a simple value with the initial value of null is displayed. The component is automatically refreshed. If the reference is null, previous reference is cleared and field is empty.

Parameters:

  • ref reference to the new value holder.
setDateFormat(dateFormat : String) : void
setDateFormats(dateFormats* : List<String>) : void

Sets the formats accepted by this local date field. The list may contain a special String constant "date" - this constant is automatically replaced by the application message named "app.dateFormat", via the LspsAppConnector.getApplicationMessage().

For formatting string specification please follow http://docs.oracle.com/javase/6/docs/api/java/text/SimpleDateFormat.html

Parameters:

  • dateFormats the list of accepted date formats. Must not be null. Must not be empty. First list item format is used to format the value in the field itself. User can however delete the text in the date field and enter a new date in any of these formats.
setParseErrorMessage(parsingErrorMessage : String) : void
Sets error message to be used when text in the field can not be parsed into date. If null then default unlocalized error message is used.
toString() : String
LocalDateRenderer extends Renderer
formatPattern : String

The date format pattern. For the format pattern syntax see http://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html

LocalDateRenderer() CONSTRUCTOR
LocalDateRenderer(formatPattern : String) CONSTRUCTOR
getFormatPattern() : String

Returns:

  • the format pattern used by this renderer.
setFormatPattern(formatPattern : String) : void

Sets the date format pattern. For the format pattern syntax see https://docs.oracle.com/javase/8/docs/api/java/time/format/DateTimeFormatter.html

Only date symbols are allowed. If the format pattern contains time related symbols, e.g. 'a', 'H', 'm' etc, the formatting will cause runtime error.

Parameters:

  • formatPattern the date format pattern for this renderer
FontAwesome5

Free font awesome 5 icons and styles https://fontawesome.com/icons?d=gallery&m=free.

codepoint : Integer
iconName : String
iconStyle : String
size : String
fixedWidth : Boolean
rotate : String
flipHorizontal : Boolean
flipVertical : Boolean
spin : Boolean
pulse : Boolean
border : Boolean
pull : String
cssClasses : String
inlineStyle : String
FontAwesome5(codepoint : Integer) CONSTRUCTOR
FontAwesome5(iconName : String) CONSTRUCTOR
border() : FontAwesome5
Convenience method for border(true);
border(shouldHaveBorder : Boolean) : FontAwesome5
Adds and removes visual border around icon. Adds and removes "fa-border" css class to html.
flipHorizontal() : FontAwesome5
Convenience method for flipHorizontal(true);
flipHorizontal(shouldFlip : Boolean) : FontAwesome5
Adds and removes horizontal flip. Adds and removes "fa-flip-horizontal" css class to html.
flipVertical() : FontAwesome5
Convenience method for flipVertical(true);
flipVertical(shouldFlip : Boolean) : FontAwesome5
Adds and removes vertical flip. Adds and removes "fa-flip-vertical" css class to html.
pullLeft() : FontAwesome5
The icon will float the to left and text will wrap around it.
pullNone() : FontAwesome5
Removes pull.
pullRight() : FontAwesome5
The icon will float the to right and text will wrap around it.
pulse() : FontAwesome5
Convenience method for pulse(true);
pulse(shouldPulse : Boolean) : FontAwesome5
Turns on and off icon pulse - rotation in 8 steps. Adds and removes "fa-pulse" css class to html.
regular() : FontAwesome5
Regular font awesome icon style. Adds "far" css class to html.
rotate180() : FontAwesome5
Icon will be rotated by 180 degrees clockwise. Adds "fa-rotate-180" css class to html.
rotate270() : FontAwesome5
Icon will be rotated by 270 degrees clockwise. Adds "fa-rotate-270" css class to html.
rotate90() : FontAwesome5
Icon will be rotated by 90 degrees clockwise. Adds "fa-rotate-90" css class to html.
rotateNone() : FontAwesome5
Removes rotation.
setClasses(cssClasses : String) : FontAwesome5
Add custom css classes to the icon.
setIconStyle(customIconStyle : String) : FontAwesome5
Css class for custom font awesome icon style. Lsps contains only regular ("far") and solid ("fas") icon sets. Use this method to supply css class for any other icon set added to project.
setInlineStyle(inlineStyle : String) : FontAwesome5
Add inline styling to the icon.
size10x() : FontAwesome5
Ten times as large font awesome icon. Adds "fa-10x" css class to html.
size2x() : FontAwesome5
Two times as large font awesome icon. Adds "fa-2x" css class to html.
size3x() : FontAwesome5
Three times as large font awesome icon. Adds "fa-3x" css class to html.
size5x() : FontAwesome5
Five times as large font awesome icon. Adds "fa-5x" css class to html.
size7x() : FontAwesome5
Seven times as large font awesome icon. Adds "fa-7x" css class to html.
sizeExtraSmall() : FontAwesome5
Extra small font awesome icon. Adds "fa-xs" css class to html.
sizeLarge() : FontAwesome5
Large font awesome icon. Adds "fa-lg" css class to html.
sizeNone() : FontAwesome5
Removes icon sizing. The icon will have default size.
sizeSmall() : FontAwesome5
Small font awesome icon. Adds "fa-xm" css class to html.
solid() : FontAwesome5
Solid font awesome icon style. Adds "fas" css class to html.
spin() : FontAwesome5
Convenience method for spin(true);
spin(shouldSpin : Boolean) : FontAwesome5
Turns on and off icon spinning. Adds and removes "fa-spin" css class to html.
stackIconsHtml(topIcon : FontAwesome5, innerIcon : FontAwesome5) : String
Creates html to render two icons at the same place.
toCsClasses(icon : FontAwesome5) : String
toHtml() : String
Creates html to render the icon.
toIconResource() : FontAwesome
Creates icon resource to be used in setIcon methods. Due to vaadin limitations,the generated icon will be just a picture. Spinning, inline styles, custom classes etc are not supported. If you need animation, colors or other similar cutomizations, add style to the component and update style sheets to make so.
widthFixed() : FontAwesome5
Convenience method for widthFixed(true);
widthFixed(hasFixedWidth : Boolean) : FontAwesome5

Turn on and off fixed width icon style, useful when icons needs to be vertically aligned. By default, icon width is not fixed.

Adds and removes "fa-fx" css class to html.

ColumnReorderEvent extends Event
SortEvent extends Event
FilterChangedEvent extends Event
MultiFileUpload extends FormComponent
refresh() : void
setAllFilesUploadedListener(listener : {AllFileUploadsDone : void}) : void

Sets the file upload listener. The listener is notified when all files upload was finished.

Parameters:

  • listener the listener to set
setFileUploadFailedListener(listener : {FileUploadFailed : void}) : void

Sets the file upload failure listener. The listener is notified when a file upload failed.

Parameters:

  • listener the listener to set
setFileUploadedListener(listener : {FileUploaded : void}) : void

Sets the file upload listener. The listener is notified when a single file was uploaded.

Parameters:

  • listener the listener to set
FileUploaded extends Event
file : File
AllFileUploadsDone extends Event
files : List<File>
FileUploadFailed extends Event
fileName : String
errorMessage : String
ItemClickEvent extends ClickEvent
item : Object
ComponentRenderer extends Renderer
MessageEvent extends Event
message : String
origin : String
WidgetState
Restored
Maximized
Minimized
Closed
Alignment
TopRight
TopLeft
TopCenter
MiddleRight
MiddleLeft
MiddleCenter
BottomRight
BottomLeft
BottomCenter
GeolocatorError

Enumerates all possible causes of a geolocation retrieval failure.

UnknownError

An unknown error occurred.

PermissionDenied

The user declined access to their position.

PositionUnavailable

The browser was unable to locate the user.

Timeout

The browser was unable to locate the user in the time specified in the PositionOptions.timeout

UnsupportedInBrowser

The browser does not support geolocation retrieval.

CalendarMode
Monthly
Weekly
Daily
NotificationType

Predefined notification types. Each notification type has its distinctive UI look, default screen position and behavior (for example, an Info notification fades away automatically while an Error notification is displayed until the user clicks the notification).

Info

Information notification. See https://vaadin.com/blog/-/blogs/user-notifications-with-vaadin for examples.

By default, notification with this type disappears immediately (that is, it slowly fades in and immediately, with no delay, starts fading out) . The nofication is shown in the middle center part of the screen by default.

Warning

Warning notification. See https://vaadin.com/blog/-/blogs/user-notifications-with-vaadin for examples.

By default, notification with this type disappears after 1,5 second and is shown in the middle center part of the screen.

Error

Error notification. See https://vaadin.com/blog/-/blogs/user-notifications-with-vaadin for examples.

By default, notification with this type requires user click to disappear and is shown in the middle center part of the screen.

Tray

Bottom-right small notification. See https://vaadin.com/blog/-/blogs/user-notifications-with-vaadin for examples.

By default, this notification disappears after 3 seconds and is shown in the bottom-right corner.

ContentMode

Content modes defining how the label's content should be rendered.

Text

Content is only a plain text.

Preformatted

Content is a preformatted text. New lines are preserved.

Html

Content is rendered as HTML.

SelectionMode
NONE
SINGLE
MULTI
TokenFieldStyle
ComboBox
TextField
SizeUnit
Pixels
Percentage
CaptionMode

Content modes defining how the component caption should be rendered.

Text

Content is only a plain text.

Html

Content is rendered as HTML.

KeyCode
ENTER
ESCAPE
PAGE_UP
PAGE_DOWN
TAB
ARROW_LEFT
ARROW_UP
ARROW_RIGHT
ARROW_DOWN
BACKSPACE
DELETE
INSERT
END
HOME
F1
F2
F3
F4
F5
F6
F7
F8
F9
F10
F11
F12
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
NUM0
NUM1
NUM2
NUM3
NUM4
NUM5
NUM6
NUM7
NUM8
NUM9
SPACEBAR
DOES_NOT_EXISTS
ModifierKey
SHIFT
CTRL
ALT
META
UploadFieldStyle
Button
FileFieldAndButton

Chart

ChartABSTRACT extends FormComponent

Abstract record for charts

onPointClick : {ChartPointClickEvent : void}
getOnPointClick() : {ChartPointClickEvent : void}
Returns on-point-click listener closure attached to this record type.
refresh() : void
Redraws the chart.
setOnPointClick(onPointClick : {ChartPointClickEvent : void}) : void
Attach on-point-click listener closure to this record type.
setPlotOptions(plotOptions* : PlotOptions...) : void

Sets the default plot options.

Parameters:

  • plotOptions default plot options
setSubTitle(subTitle : String) : void

Sets the chart sub-title

Parameters:

  • subTitle chart sub-title
setTitle(title : String) : void

Sets the chart title

Parameters:

  • title chart title
PlotOptionsABSTRACT
color : Color
dataLabels : DataLabels
stacked : Boolean
showInLegend : Boolean

shows the graph in the graph legend

shadow : Boolean

drops the shadow to the graph line

CartesianChart extends Chart

Cartesian chart that can render CategoryDataSeries, DecimalDataSeries, ListDataSeries, TimeDataSeries as line, bar, bubble, scatter, and line area graphs.

addDataSeries(dataSeries : DataSeries) : void

Adds a data series to the Cartesian chart. Once added, the data series cannot be changed with the exception of the addItem(..) method.

Parameters:

  • dataSeries data series to add
addXAxis(axis : Axis) : void
Use the defined X axis in the chart.
addYAxis(axis : Axis) : void

Use the define Y axis in the chart.

Parameters:

  • axis Y-axis configuration
setDataSeries(dataSeriesList : List<DataSeries>) : void

Sets the series of the chart: the current series are removed. Once added, the data series cannot be changed with the exception of calling the addItem(..) method.

Parameters:

  • dataSeriesList list of data series for the chart
Axis

chart axis used by the cartesian and gauge charts

Note that ticks define the properties of the units on the axis, such as tick interval (not only the tick marks).

new Axis\(
min -> 0,
max -> 10,
tickLength -> 5,
tickInterval -> 1,
tickWidth -> 2,
tickColor -> new Color\(0, 100, 100, 1\),
tickPosition -> TickPosition.outside,
plotBands -> \[
new forms::PlotBand(from -> 180, to -> 240, color -> new Color(255, 51, 102, 0.8)),
new forms::PlotBand(from -> 130, to -> 180, color -> new Color(255, 255, 102, 1))
\],
gridLineWidth -> 3,
gridLineColor -> new Color\(100, 100, 10\)
\);
type : AxisType

axis type defined as an AxisType literal:

  • AxisType.linear: points on the axis are considered part of a numeric axis
  • AxisType.category: points on the axis are considered categories
  • AxisType.datetime: points on the axis are considered dates

min : Decimal

The minimum value of the axis.

max : Decimal

The maximum value of the axis.

title : String

The title of the axis.

lineColor : Color
opposite : Boolean

A flag indicating whether to display the axis on the opposite side of the normal. This is typically used with dual or multiple axes.

reversed : Boolean

A flag indicating whether to reverse the axis so that the highest number is closest to the origin.

offset : Integer

Distance in pixels from the plot area to the axis line. This is typically used when two or more axes are displayed on the same side of the plot. Defaults to 0.

categories : List<String>
plotBands : List<PlotBand>
tickColor : Color
tickPosition : TickPosition

The position of the tick marks on the axis relative to the axis line. Default is 'outside'.

tickInterval : Decimal
tickLength : Integer
tickWidth : Integer
gridLineColor : Color

Hexadecimal color value in the form: #RRGGBB, where RR (red), GG (green) and BB (blue) are hexadecimal values between 00 and FF.

gridLineDashStyle : LineStyle

The style of the grid line.

gridLineWidth : Integer

The width in pixels of the grid line.

labels : ChartLabels

The configuration of the axis labels.

PieChart extends Chart

Pie chart with one or mulitiple pies; one pie for each PieSliceSeries.

addPieSliceSeries(series* : PieSliceSeries) : void
Adds a pie slice series to the pie chart. Once add, the series can not be changed: any changes to the series are ignored.
setPieSliceSeries(dataSeriesList* : List<PieSliceSeries>) : void
Sets a pie slice series to the graph. The previously set series are dropped. Once set, the series can not be changed: any changes to the series are ignored.
GaugeChart extends Chart

Gauge chart with a Decimal value

addYAxis(axis : Axis) : void
Uses the defined Y axis in the gauge chart.
setEndAngle(angle : Decimal) : void

Sets the end angle of the gauge in degrees. 0 is the top, 90 degrees on the right, etc.

Parameters:

  • angle angle in degrees
setFormat(format : String) : void

A format string for the data label. See forms::ChartLabels for more details.

Parameters:

  • format format string
setFormatter(formatter : String) : void

Defines a callback JavaScript function that formats the data label. See forms::ChartLabels for more details.

c.setFormatter( "'Value: ' + this.y + ' Series: ' + this.series.name ")

Parameters:

  • formatter JavaScript function
setStartAngle(angle : Decimal) : void

Sets the start angle of the gauge in degrees. 0 is at the top, 90 degrees on the right, etc.

Parameters:

  • angle angle in degrees
setValue(value : Decimal) : void
Sets the value on the gauge chart.
setValueName(name : String) : void
Sets the name of the value; For example: "Speed", "Pressure", etc.
PlotOptionsLine extends PlotOptionsScatter
lineWidth : Integer

Width of the graph line in pixels.

lineStyle : LineStyle
spline : Boolean
CategoryDataSeries extends DataSeries

Data series with data arranged in categories; it can be plotted in the CartesianChart and its subtypes.

The categories represent the values of the x axis. The x axis value is the index of the item.

When defining the items for the series, you need to define at least the amount for the y axis, or the range values.

On the cartesian chart, the categories are on the x axis and have integer labels by default.

//data on population by country:
new CategoryDataSeries \(
\[
new CategoryDataSeriesItem("Greenland", 56196, 56239),
new CategoryDataSeriesItem("China", 1388232693, 194202093),
new CategoryDataSeriesItem("India", 1342512706, 1358354355),
new CategoryDataSeriesItem("USA", 326474013, 328857273)
\]
\);
CategoryDataSeries(items* : List<CategoryDataSeriesItem>) CONSTRUCTOR

Creates a category data series.

Parameters:

  • items list of items of the data series
CategoryDataSeries(items : CategoryDataSeriesItem...) CONSTRUCTOR

Creates a new category data series.

Parameters:

  • items a list of items this data series should contain
addItem(item : CategoryDataSeriesItem) : void

Adds a data series item to the chart.

Parameters:

  • item item to be added to the series
addItem(item : CategoryDataSeriesItem, updateChart : Boolean, shift : Boolean) : void

Adds a data series item to the data series.

Parameters:

  • item item added to the data series
  • updateChart whether to update the chart immediately
  • shift whether to shift the series by removing one item form the beginning
DecimalDataSeries extends DataSeries

Data series with data arranged defined by two numbers: the x and y values. Y value can be defined as a range of low and high.

If one of the numbers is time, consider using TimeDataSeries.

//Income and percentage with bachelor's degree or higher:
def DecimalDataSeries dds := new DecimalDataSeries\(\[
new DecimalDataSeriesItem\(8,10000\),
new DecimalDataSeriesItem\(28, 50000\),
new DecimalDataSeriesItem(30, 55000),
new DecimalDataSeriesItem(40, 80000),
new DecimalDataSeriesItem(50, 120000),
new DecimalDataSeriesItem(60, 148000),
new DecimalDataSeriesItem\(70, 185000\),
new DecimalDataSeriesItem\(78, 200000\)
\]
\);
DecimalDataSeries(items* : List<DecimalDataSeriesItem>) CONSTRUCTOR

Creates a decimal-data-series item.

Parameters:

  • items decimal-series items
DecimalDataSeries(items : DecimalDataSeriesItem...) CONSTRUCTOR

Creates a new decimal data series item.

Parameters:

  • items a list of items this data series should contain
addItem(item : DecimalDataSeriesItem) : void

Adds a data series item to the chart.

Parameters:

  • item item to add to the series
addItem(item : DecimalDataSeriesItem, updateChart : Boolean, shift : Boolean) : void

Adds a decimal-data-series item to the chart.

Parameters:

  • item item to add to the series
  • updateChart whether to update the chart immediately
  • shift whether to shift the series by removing one item form the beginning
CategoryDataSeriesItem extends DataSeriesItem

item of a CategoryDataSeries

CategoryDataSeriesItem(value : Decimal) CONSTRUCTOR

Creates a category-data-series item with the y value.

Parameters:

  • value the y value
CategoryDataSeriesItem(name : String, value : Decimal) CONSTRUCTOR

Creates a category-data-series item with the name and the y value.

Parameters:

  • name category name
  • value item value
CategoryDataSeriesItem(value : Decimal, payload : Object) CONSTRUCTOR

Creates a category-data-series item with the y value and payload.

Parameters:

  • value item value
  • payload item payload
CategoryDataSeriesItem(name : String, low : Decimal, high : Decimal) CONSTRUCTOR

Creates a category-data-series item with a name, and a range with low and high.

Parameters:

  • name category name
  • low low boundary of the range
  • high high boundary of the range
CategoryDataSeriesItem(name : String, value : Decimal, payload : Object) CONSTRUCTOR

Creates a category-data-series item with the name, y value, and payload.

Parameters:

  • name category name
  • value item value
  • payload item's payload
CategoryDataSeriesItem(name : String, low : Decimal, high : Decimal, payload : Object) CONSTRUCTOR

Creates a category-data-series item with the name, range with low and high, and payload.

Parameters:

  • name category name
  • low low boundary of the range
  • high high boundary of the range
  • payload item's payload
DecimalDataSeriesItem extends DataSeriesItem

item of a DecimalDataSeries

DecimalDataSeriesItem(x : Decimal, y : Decimal) CONSTRUCTOR

Creates a data series item with the x and y values.

Parameters:

  • x x value
  • y y value
DecimalDataSeriesItem(x : Decimal, low : Decimal, high : Decimal) CONSTRUCTOR

Creates a data series item with the x values, and range with the high and low.

Parameters:

  • x x value
  • low low point of the range
  • high high point of the range
DecimalDataSeriesItem(x : Decimal, y : Decimal, payload : Object) CONSTRUCTOR

Creates a data series item with the x and y values, and payload.

Parameters:

  • x x value
  • y y value
  • payload payload
DecimalDataSeriesItem(x : Decimal, low : Decimal, high : Decimal, payload : Object) CONSTRUCTOR

Creates a data series item with the x values, payload, and range with the high and low.

Parameters:

  • x x value
  • low low point of the range
  • high high point of the range
  • payload payload
DataSeriesItemABSTRACT

abstract record for items of different data series

Depending on the type of data the item holds, not all properties must define a value.

name : String

name of the data series item

x : Decimal

x coordinate of the data series item

y : Decimal

y coordinate of the data series item

high : Decimal

maximum of the range for y axis

low : Decimal

minimum of the range for y axis

payload : Object

payload with data about the item

colorDEPRECATED : String

Unused property kept only for backward compatibility. Use itemColor property instead.

dataLabels : DataLabels

formating of the data label for the data series item

itemColor : Color
DataSeriesABSTRACT

Set of related data items; they are plotted together with common options, for example, as one connected line graph.

chart : CartesianChart
name : String

data-series name

items : List<DataSeriesItem>

data items comprising the data series

plotOptions : PlotOptions

properties for plotting of the data series

range : Boolean

whether the data series holds range values

xAxis : Integer

Zero-based index of the X-axis this series is connected; this is applicable when using dual or multiple X-axes.

yAxis : Integer

Zero based index of the Y-axis this series is connected to when using dual or multiple Y-axes.

addItem(item : DataSeriesItem, updateChart : Boolean, shift : Boolean) : void

Adds a data-series item to the chart.

Parameters:

  • item item to add to the series
  • updateChart whether to update the chart immediately
  • shift whether to shift the series by removing one item from the beginning
isRangeItems(items : List<DataSeriesItem>) : Boolean

Checks if the data series contains only data-series items with range.

Parameters:

  • items items to check

Returns:

  • true if all items define a range, that is, for each item the methods getLow() and getHigh() return a non-null value.
setPlotOptions(plotOptions : PlotOptions) : void

Sets plot options for the data series.

Parameters:

  • plotOptions plot options
PlotOptionsLineArea extends PlotOptionsLine
fillColor : Color

Hexadecimal color value in the form: #RRGGBB, where RR (red), GG (green) and BB (blue) are hexadecimal values between 00 and FF.

fillOpacity : Decimal

Fill opacity as a decimal number from interval [0.0, 1.0].

range : Boolean

Flag indicating whether the data series should be rendered as range series.

PlotOptionsColumn extends PlotOptions
range : Boolean
PlotOptionsScatter extends PlotOptions
marker : Marker
PlotBand

A plot band is a colored band stretching across the plot area marking an interval on the axis.

from : Decimal
to : Decimal
label : String

The text label for the plot band.

color : Color

Hexadecimal color value in the form: #RRGGBB, where RR (red), GG (green) and BB (blue) are hexadecimal values between 00 and FF.

TimeDataSeriesItem extends DataSeriesItem

item of a TimeDataSeries

date : Date
TimeDataSeriesItem(date* : Date, value : Decimal) CONSTRUCTOR

Creates a time data series item.

Parameters:

  • date the item's date
  • value the item's value
TimeDataSeriesItem(date* : Date, low : Decimal, high : Decimal) CONSTRUCTOR

Creates a range time data series item.

Parameters:

  • date the item's date
  • low the low value
  • high the high value
TimeDataSeriesItem(date* : Date, value : Decimal, payload : Object) CONSTRUCTOR

Creates a time data series item.

Parameters:

  • date the item's date
  • value the item's value
  • payload the item's payload
TimeDataSeriesItem(date* : Date, low : Decimal, high : Decimal, payload : Object) CONSTRUCTOR

Creates a range time data series item.

Parameters:

  • date the item's date
  • low the low value
  • high the high value
  • payload the item's payload
TimeDataSeries extends DataSeries

Data series with data arranged defined by a point in time and a number.

When using the Date type, make sure to set the x axis to the required type;

(`new Axis( 'type' -> AxisType.datetime)`).

new TimeDataSeries\(
\[
new TimeDataSeriesItem(date(1960), 667.1),
new TimeDataSeriesItem(date(2016), 1379)
\]
\)
TimeDataSeries(items* : List<TimeDataSeriesItem>) CONSTRUCTOR

Creates a new time data series item.

Parameters:

  • items a list of items this data series should contain
TimeDataSeries(items : TimeDataSeriesItem...) CONSTRUCTOR

Creates a new time data series item.

Parameters:

  • items a list of items this data series should contain
addItem(item : TimeDataSeriesItem) : void

Adds a data series item to the chart.

Parameters:

  • item the item which should be added to the series.
addItem(item : TimeDataSeriesItem, updateChart : Boolean, shift : Boolean) : void

Adds a data series item to the chart.

Parameters:

  • item the item which should be added to the series.
  • updateChart indicates whether to update the chart immediately
  • shift indicates whether to shift the series by removing one item form the beginning
PieSlice

pie slice of pie slice series

new PieSliceSeries\(\"My only series\", \[
new forms::PieSlice("Big slice", 50, "Business data", new Color("#162955")),
new forms::PieSlice("Middle slice", 30, "Business data", new Color("#4F628E")),
new forms::PieSlice("Small slice", 20, "Business data", new Color("#7887ab"))
\]\);
name : String

name of the pie slice

value : Decimal

value of the pie slice

payload : Object

payload of the pie slice

color : Color

color of the slice defined as #RRGGBB, where RR (red), GG (green) and BB (blue) are hexadecimal values between 00 and FF.

PieSlice(name* : String, value* : Decimal) CONSTRUCTOR

Creates a new instance of the pie slice.

Parameters:

  • name the name of the slice
  • value the value of the slice - it's size
PieSlice(name* : String, value* : Decimal, color : Color) CONSTRUCTOR

Creates a new instance of the pie slice.

Parameters:

  • name the name of the slice
  • value the value of the slice - it's size
  • color the color of this pie slice
PieSlice(name* : String, value* : Decimal, payload : Object) CONSTRUCTOR

Creates a new instance of the pie slice.

Parameters:

  • name the name of the slice
  • value the value of the slice - it's size
  • payload
PieSlice(name* : String, value* : Decimal, payload : Object, color : Color) CONSTRUCTOR

Creates a new instance of the pie slice.

Parameters:

  • name the name of the slice
  • value the value of the slice - it's size
  • payload
  • color the color of this pie slice
PolarChart extends CartesianChart

Polar chart that can render CategoryDataSeries, DecimalDataSeries, ListDataSeries, TimeDataSeries as line, bar, bubble, scatter, and line area graphs.

PlotOptionsPie
size : AttributeSize

The diameter of the pie. If expressed as a percentage value then the size is relative to the plot area.

innerSize : AttributeSize

The size of the inner diameter of the pie. If expressed as a percentage value then the size is relative to the plot area.

borderWidth : Integer

The width of the border surrounding each slice.

center : AttributeCenter

center of the pie relative to the corner of the plotting area (0,0 is the upper left corner)

new PlotOptionsPie\(center -> new AttributeCenter\(\"20%\", \"50\"\)\);

startAngle : Decimal

Start angle of the pie slices in degrees where 0 is top and 90 right. Should be smaller than end angle.

endAngle : Decimal

The end angle of the pie in degrees where 0 is top and 90 is right. Defaults to startAngle plus 360. Should be larger than start angle.

showInLegend : Boolean

A flag indicating whether to show the data series in the graph legend.

dataLabels : PieDataLabels

Configurations of the labels rendered for the pie slices.

shadow : Boolean

drops the shadow to the graph line

AttributeSize

Size attribute in a pixel or percentage value.

new PlotOptionsPie\(
innerSize -> new AttributeSize\(\"2\"\),
size -> new AttributeSize\(\"60%\"\)
\);
size : Object

a size as a pixel value or a percentage value

AttributeSize(size* : Integer) CONSTRUCTOR

Creates a size attribute with the value in pixels.

Parameters:

  • size the size in pixels
AttributeSize(size* : String) CONSTRUCTOR

Creates a relative size attribute with the value in percent.

Parameters:

  • size size in percent
AttributeCenter

Center coordinates in pixel or percentage values relative to the upper left.

left : Object
top : Object
AttributeCenter(left* : Integer, top* : Integer) CONSTRUCTOR

Creates center coordinates with the defined position.

Parameters:

  • left distance from the left border in pixels
  • top distance form the top border in pixels
AttributeCenter(left* : String, top* : String) CONSTRUCTOR

Creates relative center coordinates expressed in percentage.

Parameters:

  • left the distance from the left border
  • top the distance form the top border
PieSliceSeries

Data series for the PieChart

name : String

name of the series

slices : List<PieSlice>

list of pie slices

plotOptions : PlotOptionsPie

plot options for the pie chart

PieSliceSeries(slices* : List<PieSlice>) CONSTRUCTOR

Creates a new series for the pie chart.

Parameters:

  • slices a list of pie slices
PieSliceSeries(slices : PieSlice...) CONSTRUCTOR

Creates a new series for the pie chart.

Parameters:

  • slices a list of pie slices
PieSliceSeries(name : String, slices* : List<PieSlice>) CONSTRUCTOR

Creates a new series for the pie chart.

Parameters:

  • name the name of this series
  • slices a list of pie slices
PieSliceSeries(name : String, slices : PieSlice...) CONSTRUCTOR

Creates a new series for the pie chart.

Parameters:

  • name the name of this series
  • slices a list of pie slices
Labels

A configuration record for labels.

enabled : Boolean

enables or disabled the data labels

formatter : String

Callback JavaScript function to format the data label. If a format is defined, the format takes precedence and the formatter is ignored.

Available data are:

  • this.percentage: Stacked series and pies only. The point's percentage of the total.
  • this.point: The point object. The point name, if defined, is available through this.point.name.
  • this.series: The series object. The series name is available through this.series.name.
  • this.total: Stacked series only. The total value at this point's x value.
  • this.x: The x value.
  • this.y: The y value.

format : String

A format string for the data label. Available variables are the same as for formatter. Defaults to {y}.

rotation : Integer

Rotation of labels in degrees.

PieDataLabels extends DataLabels
distance : Integer

The distance of the data label from the pie's edge. Negative numbers put the data label on top of the pie slices. Connectors are only shown for data labels outside the pie.

ListDataSeries extends DataSeries

Data series with data with one decimal value.

new ListDataSeries\(
\[
new ListDataSeriesItem( 1 ),
new ListDataSeriesItem( 5 )
\]
\)
ListDataSeries(items : List<Decimal>) CONSTRUCTOR
A convenience constructor to create a list series directly from values.
ListDataSeries(items : Decimal...) CONSTRUCTOR
A utility constructor to create list series directly from the values.
ListDataSeries(items : List<ListDataSeriesItem>) CONSTRUCTOR
A constructor accepting the list of items.
ListDataSeries(items : ListDataSeriesItem...) CONSTRUCTOR
A constructor accepting the list of items.
addItem(item : ListDataSeriesItem) : void

Adds a data series item to the chart.

Parameters:

  • item item to add to the the list data series
addItem(item : ListDataSeriesItem, updateChart : Boolean, shift : Boolean) : void

Adds a list-data-series item to the chart.

Parameters:

  • item item to add to the series
  • updateChart whether to update the chart immediately
  • shift whether to remove one item form the beginning and shift the chart
ListDataSeriesItem extends DataSeriesItem

item of a ListDataSeries

ListDataSeriesItem(value : Decimal) CONSTRUCTOR

Creates a new list series item for the given value.

Parameters:

  • value the item value
ListDataSeriesItem(value : Decimal, payload : Object) CONSTRUCTOR

Creates a new list series item for the given value and payload.

Parameters:

  • value the item value
  • payload the item payload
Color
red : Integer

red component: 0 - 255

green : Integer

green component: 0 - 255

blue : Integer

blue component: 0 - 255

alpha : Decimal

The alpha parameter is a number between 0.0 (fully transparent) and 1.0 (fully opaque).

Color(color : String) CONSTRUCTOR

Creates a new color expressed in the format #RRGGBB

Parameters:

  • color Hexadecimal color value in the form: #RRGGBB, where RR (red), GG (green) and BB (blue) are hexadecimal values between 00 and FF.
Color(red : Integer, green : Integer, blue : Integer) CONSTRUCTOR

Creates a new color expressed in RGB

Parameters:

  • red the red component
  • green the green component
  • blue the blue component
Color(red : Integer, green : Integer, blue : Integer, alpha : Decimal) CONSTRUCTOR

Creates a new color expressed in RGBa

Parameters:

  • red the red component
  • green the green component
  • blue the blue component
  • alpha the alpha component
validateColorComponent(name : String, value : Integer) : void
ChartPointClickEvent extends ClickEvent

Click event on a point in a chart

series : String

name of the clicked series

key : Object

key of the clicked point

value : Object

value of the point or, for a range item, the lower value

highValue : Object

high value if the clicked item has a range; otherwise null

payload : Object

payload of the clicked point

DataLabels extends Labels
color : Color
ChartLabels extends Labels
PlotOptionsBubble extends PlotOptionsScatter

Plot options which causes a data series items to be printed as bubbles. The data series must contain range data series items where the 'low' value is interpreted as the item value and the 'high' value is used to calculate the bubble diameter.

lineWidth : Integer
lineStyle : LineStyle
LineStyle

Line style used for drawing line-based charts

solid
dot
dash
dashDot
dashDotDot
Marker

Marker shape used for data points

circle
square
diamond
triangle
triangle-down
none
TickPosition

position of the tick marks on the axis relative to the axis line

outside
inside
AxisType

enumeration used by the Axis.type property

linear
datetime

value on the axis are plotted as points in time (if an axis is set to another type, for example, by default,

and your axis plots Date objects, the dates are rendered as integers).

category

Datasource

CompareFilterREAD-ONLY extends Filter

Comparable filter. Rejects nulls. Expects Decimal and Date only.

op : Op

Filtered value must be "op" than the value present in this filter, in order for the filtered value to pass this filter.

value : Object

Only supports comparable types: Date, Decimal, String, Enumeration and Boolean. Not null.

CompareFilter(valueProvider* : ValueProvider, operation* : Op, value* : Object) CONSTRUCTOR

Compares the row-extracted value against this value.

Parameters:

  • operation the operation
  • value the value to compare the row-extracted value against. Not null.
compare(o1 : Object, o2 : Object) : Integer
matches(object : Object) : Boolean
toString() : String
SortREAD-ONLY
valueProvider : ValueProvider

Provides values from data rows. The sorting of the data rows will be performed upon the provided values.

ascending : Boolean

True if rows with greatest values will be placed last (bottom-most).

Sort(property* : Property, ascending* : Boolean) CONSTRUCTOR

Creates the sorting criteria.

Parameters:

  • property The sorting of the data rows will be performed upon the value of this property.
  • ascending True if rows with greatest values will be placed last (bottom-most).
Sort(valueProvider* : ValueProvider, ascending* : Boolean) CONSTRUCTOR

Creates the sorting criteria.

Parameters:

  • valueProvider Provides values from data rows. The sorting of the data rows will be performed upon the provided values.
  • ascending True if rows with greatest values will be placed last (bottom-most).
asc(property* : Property) : Sort
asc(valueProvider* : ValueProvider) : Sort
compare(row1 : Object, row2 : Object) : Integer

Compares two row objects according to this sort specification.

Parameters:

  • row1 first row object
  • row2 second row object

Returns:

  • negative if row1 should appear before row2, positive if row1 should appear after row2, 0 if row1 and row2 seems equal (at least from the limited perspective of this sort spec)
compareObjects(o1 : Object, o2 : Object) : Integer
desc(property* : Property) : Sort
desc(valueProvider* : ValueProvider) : Sort
sort(set* : Set<E>) : Set<E>

Returns a new set, containing all data rows from the old set but sorted.

Parameters:

  • set the set to sort, not null.

Returns:

  • a new set with items sorted according to this sort specification.
sort(set* : List<E>) : List<E>

Returns a new set, containing all data rows from the old set but sorted.

Parameters:

  • set the set to sort, not null.

Returns:

  • a new set with items sorted according to this sort specification.
toString() : String
MultiValueFilterREAD-ONLY extends Filter

Similar to ValueFilter but accepts multiple values. Expects Date, Decimal, EnumerationImpl and Boolean only.

values : Set<Object>
MultiValueFilter(valueProvider* : ValueProvider, vals* : Set<Object>) CONSTRUCTOR

Creates a filter which only matches rows having row-extracted value equal to one of provided values. Think of this filter as a more generic version of ValueFilter. This filter accepts any row-extracted values: not only comparables, but also records, closures, anything.

Parameters:

  • vals only accept rows with row-extracted value equal to one of these values. Must not be null but may contain null. Empty set rejects all values.
matches(object : Object) : Boolean
toString() : String
RegexpFilterREAD-ONLY extends Filter

Only works for String objects - throws exception for any other object type. Matches given string against given regular expression.

regexp : String
RegexpFilter(valueProvider* : ValueProvider, regex* : String) CONSTRUCTOR

Compares the row-extracted value against given regexp. The value must be a String otherwise the filter fails at runtime.

Parameters:

  • regex the Java regex, not null.
matches(object : Object) : Boolean
matches(str : String, regexp : String) : Boolean
toString() : String
ValueFilterREAD-ONLY extends Filter

Allows only one value. Expects Date, Decimal, EnumerationImpl and Boolean only.

value : Object

The expected value, may be null.

ValueFilter(valueProvider* : ValueProvider, value : Object) CONSTRUCTOR

Creates a filter which only matches rows having row-extracted value equal to this value. This filter accepts any row-extracted values: not only comparables, but also records, closures, anything.

Parameters:

  • value only accept rows with this row-extracted value. May be null.
matches(object : Object) : Boolean
toString() : String
DataSource

Provides paged rows from a storage, for example from a database.

getCount(filters : Collection<Filter>) : Integer

Returns the total number of lines, matching given filters.

Parameters:

  • filters a collection of filters to apply to the data itself. May be null if no filters are to be applied.

Returns:

  • the total number of records which match given criteria. Not null, must be 0 or greater.
getData(startIndex* : Integer, count* : Integer, filters : Collection<Filter>, sortSpecs : Set<Sort>) : List<Object>

Retrieves data from the data source. The data is first filtered and sorted, then paged. An exception will be thrown if an unsupported Filter or Sort is passed.

Parameters:

  • startIndex paging: starting index, or offset, of the (sorted and filtered) data.
  • count paging: number of (sorted and filtered) rows to return
  • filters a collection of filters to apply to the data itself. May be null if no filters are to be applied.
  • sortSpecs an (ordered) set of sort specs to apply. May be null.

Returns:

  • a list of matched objects, most often Records. Must be 0 or greater, should not be more than stated by the count parameter. Must not be null. Should be ordered and filtered as specified by filters and/or sortSpecs.
supportsFilter(filter* : Filter) : Boolean

Checks if this filter is supported by this datasource.

Parameters:

  • filter the filter in question, not null.

Returns:

  • true if this data source supports given filter, false if not. Must not return null.
supportsSort(sort* : Sort) : Boolean

Checks if this sorting criteria is supported by this datasource.

Parameters:

  • sort the sort criteria, not null.

Returns:

  • true if this data source supports given sorting criteria, false if not. Must not return null.
SubstringFilterREAD-ONLY extends Filter

Checks that the value is a String which contains given substring. The filter only works for String objects - throws exception for any other object type.

value : String

All passed values must contain given string as its substring. Case-insensitive.

SubstringFilter(valueProvider* : ValueProvider, value* : String) CONSTRUCTOR

Creates a filter which only matches rows having row-extracted string value containing given string. This filter accepts any row-extracted values and converts them to String.

Parameters:

  • value only accept rows which row-extracted string value contains this string, case-insensitive. Not null.
matches(object : Object) : Boolean
toString() : String
FilterABSTRACTREAD-ONLY

Filters Grid data row object. First, a value is obtained from the row (using the valueProvider), then it is checked if the value matches this filter. Only a small subset of filters is supported - the objective here is that these filters will be able to be run on the database, thus avoiding in-memory filtering.

In-memory filtering is expensive because it requires us to pull all rows from the database.

valueProvider : ValueProvider

Provides the value from the data row. The filter further operates on the value and either rejects it, or accepts it.

id : Object

Filter id assigned in <code>FilterConfig</code>. Used to identify all filters configured with the same <code>FilterConfig</code>.

Filter(valueProvider* : ValueProvider) CONSTRUCTOR
matches(object : Object) : Boolean

Tests if this filter matches given object.

Parameters:

  • object the object, may be null. This is not a row object per se - instead, this object is a product of #valueProvider run over given row object.
ValueProvider

Used to provide a particular value from the data row, for example provides Person.name out of a Person.

get(row : Object) : Object
Receives a row data object on input and provides a value from it (a value of a particular field for example), which will later be sorted and/or filtered.
getPropertyPath() : PropertyPath
If this provider provides a value of a property path, return this path. Otherwise, return null. This may be for example used by the database, to efficiently perform filtering and/or sorting (using the native SQL WHERE). If this is null, the sorting/filtering can not be performed in the database and will be performed in-memory, massively decreasing performance.
getValueType() : Type<Object>
Returns the type of the value produced by the get(Object) function. If the value type cannot be detected properly, just return Type(Object).
ClosureValueProvider

A closure value provider - simply polls provided closure for data, in the get() method. When used in Grid, this provider forces the Grid to sort/filter in-memory, massively degrading performance for large data sets.

closure : {Null : Object}

This closure is simply called by the get() method.

ClosureValueProvider(closure* : {Null : Object}) CONSTRUCTOR

Runs the table row through given closure.

Parameters:

  • closure the closure
callClosure(c* : {Null : Object}, input : Object) : Object
get(input : Object) : Object
getPropertyPath() : PropertyPath

Closure has no property path, always returns null.

Returns:

  • always null
getReturnType(closure* : {Null : Object}) : Type<Object>
getValueType() : Type<Object>
toString() : String
ConstantValueProvider

Always provides given value. When used in Grid, this provider forces the Grid to sort/filter in-memory, massively degrading performance for large data sets.

value : Object
ConstantValueProvider(value : Object) CONSTRUCTOR

Always provide given value.

Parameters:

  • val the value to provide.
get(input : Object) : Object

Returns:

  • Always #value
getPropertyPath() : PropertyPath

Returns:

  • always null.
getValueType() : Type<Object>
toString() : String
PropertyPathValueProvider

Runs given PropertyPath over data row records and provides the result. When used in Grid, this provider is able to issue native SQL where/order, massively improving performance.

path : PropertyPath
PropertyPathValueProvider(path* : PropertyPath) CONSTRUCTOR

De-references given property path on a record and returns its value. Only accepts Record rows. See forms::PropertyPath for more information.

Parameters:

  • path the record property, not null.
get(row : Object) : Object
getPropertyPath() : PropertyPath

Returns:

  • the property path given to the constructor, never null
getValueType() : Type<Object>
toString() : String
ForcedSortDataSource extends DataSourceDelegate

Delegates calls to the underlying DS but always prepends given set of sort criteria, thus sorting primarily by this criteria. Do not instantiate directly - use the DataSource.withSort() method instead.

additionalSort : Set<Sort>
ForcedSortDataSource(delegate* : DataSource, sort* : Set<Sort>) CONSTRUCTOR

Delegates calls to given delegate, but always applies given set of sort criteria.

Parameters:

  • delegate delegate data retrieval calls here, not null.
  • sort always apply this set of sort criteria after any additional sort criteria provided to the getData() function. Not null; may be empty but it makes no sense.
getData(startIndex* : Integer, count* : Integer, filters : Collection<Filter>, sortSpecs : Set<Sort>) : List<Object>
toString() : String
DataSourceDelegateABSTRACT

Simply delegates all calls to the delegate.

delegate : DataSource
DataSourceDelegate(delegate* : DataSource) CONSTRUCTOR

Simply delegates all calls to given datasource. Extend this class to implement more interesting implementations.

Parameters:

  • delegate delegates all calls here, not null.
getCount(filters : Collection<Filter>) : Integer
getData(startIndex* : Integer, count* : Integer, filters : Collection<Filter>, sortSpecs : Set<Sort>) : List<Object>
supportsFilter(filter* : Filter) : Boolean
supportsSort(sort* : Sort) : Boolean
toString() : String
ForcedFilterDataSource extends DataSourceDelegate

Delegates calls to the underlying DS but always applies given set of filter criteria, along with any other filters provided in getCount()/getData(). Do not instantiate directly - use the DataSource.withFilter() method instead.

additionalFilters : Collection<Filter>

Always applies this set of filter criteria, along with any other filters provided in getCount()/getData().

ForcedFilterDataSource(delegate* : DataSource, filters* : Collection<Filter>) CONSTRUCTOR

Delegates calls to given delegate, but always applies given set of filter.

Parameters:

  • delegate delegate data retrieval calls here, not null.
  • filters always apply this set of filters on top of any additional filters provided to getCount()/getData() functions. Not null; may be empty but it makes no sense.
getCount(filters : Collection<Filter>) : Integer
getData(startIndex* : Integer, count* : Integer, filters : Collection<Filter>, sortSpecs : Set<Sort>) : List<Object>
toString() : String
TypeDataSource

A DataSource which provides all instances of given Record.

recordType : Type<Record>
TypeDataSource(t* : Type<Record>) CONSTRUCTOR
getCount(filters : Collection<Filter>) : Integer
getData(startIndex* : Integer, count* : Integer, filters : Collection<Filter>, sortSpecs : Set<Sort>) : List<Object>
supportsFilter(filter* : Filter) : Boolean
supportsSort(sort* : Sort) : Boolean
toString() : String
CollectionDataSource

In-memory sorts and filters given collection.

Has very low performance when compared to TypeDataSource; when using Shared Records, please consider using other data sources which perform native in-DB data sorting and filtering.

list : List<Object>

Provides contents of this list, filtered and sorted as necessary.

CollectionDataSource(values* : Collection<Object>) CONSTRUCTOR

In-memory sorts/filters out objects in this collection.

Parameters:

  • values the collection of values, not null.
getCount(filters : Collection<Filter>) : Integer
getData(startIndex* : Integer, count* : Integer, filters : Collection<Filter>, sortSpecs : Set<Sort>) : List<Object>
supportsFilter(filter* : Filter) : Boolean
supportsSort(sort* : Sort) : Boolean
toString() : String
IdentityValueProvider

Simply provides the row itself as the row-extracted value. Useful in Combo-boxes or Tables, for example when modeling a column with the "Delete" or "Edit" action link - this way, the link will gain access to the entire Record and can delete it easily.

valueType : Type<Object>
IdentityValueProvider(valueType : Type<Object>) CONSTRUCTOR

Creates an identity provider with the declared value type. If the value type is null then the type Object is used.

Parameters:

  • valueType the value type
get(row : Object) : Object
getPropertyPath() : PropertyPath
getValueType() : Type<Object>
TreeDataSource
getChildren(parent : Object) : List<Object>

Retrieves child objects for given parent object. Initially, this method is called with the null parameter, to retrieve all possible root nodes; as the root nodes are expanded by the user, this method is gradually called for the node objects.

Parameters:

  • parent retrieve children for this parent.

Returns:

  • the child nodes. If empty or null, the parent node is marked as a leaf node (it has no children).
ClosureTreeDataSource
closure : {Object : List<Object>}

Called to poll the list of children for given parent. See TreeDataSource.getChildren() for details. Not null.

ClosureTreeDataSource(closure* : {Object : List<Object>}) CONSTRUCTOR
getChildren(parent : Object) : List<Object>
SimpleTwoLevelTreeDS

Constantly provides given map as a simple two-level tree: map keys are simply returned as root objects, map values are returned as respective root children.

data : Map<Object, List<Object>>
SimpleTwoLevelTreeDS(data* : Map<Object, List<Object>>) CONSTRUCTOR
getChildren(parent : Object) : List<Object>
EmptyTreeDataSource
getChildren(parent : Object) : List<Object>
Compatibility31DataSourceDEPRECATED

A special data source used to convert ui-based forms.

data : {Integer, Integer : Collection<Object>}
dataCount : { : Integer}
Compatibility31DataSource(data* : {Integer, Integer : Collection<Object>}, dataCount* : { : Integer}) CONSTRUCTOR
getCount(filters : Collection<Filter>) : Integer
getData(startIndex* : Integer, count* : Integer, filters : Collection<Filter>, sortSpecs : Set<Sort>) : List<Object>
supportsFilter(filter* : Filter) : Boolean
supportsSort(sort* : Sort) : Boolean
ToStringValueProvider
get(object : Object) : Object
Converts object to string
getPropertyPath() : PropertyPath
Not applicable - returns null.
getValueType() : Type<Object>
Returns string type
QueryDataSource
query : { : List<Object>}
QueryDataSource(query* : { : List<Object>}) CONSTRUCTOR
getCount(filters : Collection<Filter>) : Integer
getData(startIndex* : Integer, count* : Integer, filters : Collection<Filter>, sortSpecs : Set<Sort>) : List<Object>
supportsFilter(filter* : Filter) : Boolean
supportsSort(sort* : Sort) : Boolean
toString() : String
Op
Equal
Less
Greater
LessOrEqual
GreaterOrEqual