LSPS documentation logo
LSPS Documentation
Functions

UI

addToRegistrationPoints(registrationPoints : Map<String, Set<Reference<Set<Listener>>>>, key : String, components : UIComponent...) : Map<String, Set<Reference<Set<Listener>>>>DEPRECATED

Utility function which adds component specified in third parameter to map of registrationPoints under the key key. Deprecated.

addToPublishedListeners(publishedListeners : Map<String, Set<Listener>>, key : String, listeners : Listener...) : Map<String, Set<Listener>>DEPRECATED

Utility function which adds listener specified in third parameter to map of publishedListeners under the key key. Deprecated.

rgb(red* : Integer, green* : Integer, blue* : Integer) : String

Returns a string used to represent a color given by red, green and blue components. Each color component is an integer from interval 0 to 255. The result has form of usual hexadecimal color representation, e.g., "#ff0000" for red.

Throws:

  • "NullParameterError" if mandatory parameter is null.

createValidationError(message : String) : UIValidationError

If the given message is not null, this function returns a UIValidationError with a given message. Otherwise it returns null.

createValidationError(message : String, placement : UIComponent) : UIValidationError

If the given message is not null, this function returns a UIValidationError with a given message and placement. Otherwise it returns null.

createValidationError(message : String, placement : Set<UIComponent>) : UIValidationError

If the given message is not null, this function returns a UIValidationError with a given message and placement. Otherwise it returns null.

getBrowserWindowSize() : Dimension

Retrieves the size, in DPIs, of the current browser window.

notify(caption* : String, description : String, type : NotificationType, position : Position, delayMillis : Integer, cssStyle : String, htmlContentAllowed : Boolean) : Object

Shows a simple notification to the user. Must be called from UI listener.

Dynamic UI

addTab(tabbedLayout* : TabbedLayout, tab* : Tab) : Null

Dynamically adds a tab to given tabbed layout. If the tab is already present in the tabbed layout, this function does nothing.

Throws:

  • "NullParameterError" if mandatory parameter is null.

removeTab(tabbedLayout* : TabbedLayout, tab* : Tab) : Null

Dynamically removes a tab to given tabbed layout. If the tab is not yet present in the tabbed layout, this function does nothing.

Throws:

  • "NullParameterError" if mandatory parameter is null.

selectTab(tabbedLayout* : TabbedLayout, tab* : Tab) : Null

Selects given tab on given tabbed layout. Does nothing if the tabbed layout does not contain such tab.

Throws:

  • "NullParameterError" if mandatory parameter is null.

invoke(targets* : Collection<Container>, methodName* : String, parameters* : List<Object>) : Null

Executes "Container methods".

Throws:

  • "NullParameterError" if mandatory parameter is null.

findTopmostComponents(type* : Type<T>, root* : UIComponent) : List<T>

Returns top most components.

Throws:

  • "NullParameterError" if mandatory parameter is null.

findTopmostContainers(root* : UIComponent) : List<Container>

Returns top most containers.

Throws:

  • "NullParameterError" if mandatory parameter is null.

refresh(components : Collection<UIComponent>) : Null

Slates given components for refresh. The components are refreshed when the listener ends.

persist() : Null

Persists immediately.

requestSubmit() : Null

Requests submit after all listeners are processed

requestSubmitAndNavigate(navigateTo* : Navigation) : Null

Requests submit and navigation after all listeners are processed

Throws:

  • "NullParameterError" if mandatory parameter is null.

merge(viewModels* : Collection<ViewModel>) : Null

Merges given view models to upper levels (one level up).

Throws:

  • "NullParameterError" if mandatory parameter is null.

clear(viewModels* : Collection<ViewModel>) : Null

Clears given view models.

Throws:

  • "NullParameterError" if mandatory parameter is null.

showConstraintViolations(constraintViolations* : List<ConstraintViolation>) : Null

Maps given constraint violations to Vaadin components, according to the exclude/include rules.

Throws:

  • "NullParameterError" if mandatory parameter is null.

createAndShow(def* : Popup) : Popup

Creates a Vaadin instance of popup, bound to given definition record, and shows it. Does nothing if there already is popup bound to this instance of definition record.

Throws:

  • "NullParameterError" if mandatory parameter is null.

hideAndDestroy(def* : Popup) : Null

Hides Vaadin popup, bound to given definition record, and destroys it. Does nothing if there is no popup registered to given record.

Throws:

  • "NullParameterError" if mandatory parameter is null.

createAndAdd(what* : T, where* : UIComponent) : T

Creates a Vaadin instance for given component definition and adds it to given layout.

Throws:

  • "NullParameterError" if mandatory parameter is null.

addColumn(what* : TableColumn, where* : UIComponent) : TableColumn

Creates a Vaadin instance for given table column definition and adds it to given table. Does nothing if there already is table column present for given definition.

Throws:

  • "NullParameterError" if mandatory parameter is null.

removeAndDestroy(what* : UIComponent, where : UIComponent) : Null

Removes and destroys given component. If called from a listener, the "where" parameter is ignored. When called from form initializer, "where" must point to "what"'s parent.

Throws:

  • "NullParameterError" if mandatory parameter is null.

removeAll(container* : UIComponent) : Null

Removes all children from given container. Only horizontal layout, vertical layout and form layout are supported.

Throws:

  • "NullParameterError" if mandatory parameter is null.

getColumns(table* : UIComponent) : List<TableColumn>

Returns the current list of table columns of a given Table or TreeTable2. This may differ to the 'columns' property if the column list has been altered dynamically.

getColumnStates(table* : UIComponent) : List<TableColumnState>

Returns the state of columns of a Table or TreeTable2. The state can be restored to the table by calling 'restoreColumnStates' function.

Throws:

  • "NullParameterError" if mandatory parameter is null.

restoreColumnStates(table* : UIComponent, columnStates* : List<TableColumnState>) : Null

Restore the state to the table columns. The state of table columns can be obtained by calling 'getColumnStates' function.

Throws:

  • "NullParameterError" if mandatory parameter is null.

getTabs(tabbedLayout* : TabbedLayout) : List<Tab>

Returns the current list of tabs of a given TabbedLayout. This may differ to the 'tabs' property if the tab list has been altered dynamically.

getChildren(layout* : UIComponent) : List<UIComponent>

Returns the current list of children of a given layout component. This may differ to the 'children' property if the child list has been altered dynamically.