REST Button component icon REST Button

The REST Button provides a way to perform a GET request on a REST endpoint. That way, data can be loaded dynamically at runtime into the form. The response is stored in the Value variable.

Setting a REST Button to Auto Execute is possible. This allows for even more dynamic integration scenarios.

Appearance

Design Rendered
REST Button component rendered
REST Button component design

Attributes

Group Name Description

General

ID

This is a unique id for the component.

Label

The label attribute adds a label to the component, if not empty.

Button text

The text rendered within the button. You can also use expressions (for example, 'click here to go to {{name}}').

Value

Model where the result is saved.

Description

The description attribute additionally adds a description to the component.

Visible

Boolean value or expression specifies whether the component is visible or hidden. This expression might include another value in the same form, for instance, use a checkbox bound to {{showAdditionalFields}} and use the very same expression as the visible attribute to show or hide the component according to the checked state of the checkbox. If you want only to show the component, if the form is not used as the init-form, you can use the expression {{root.id}} which evaluates to true only, if there is a current id which is not the id in a start form.

Ignored

If true the component is hidden and the value is not part of the payload.

Enabled

A Boolean value or expression specifies whether component is enabled or disabled.

Details

REST URL

The REST endpoint from where data is retrieved.

Response data path

Where to find data in a JSON response.

Value expression

Expression that returns the value to store. $response keeps the value returned by the REST call. For example, {{flw.round($response.returnedValue, 2)}}. If the path is defined, $response keeps the value of the REST response in that path.

Refresh time

The interval (in milliseconds) to execute the button automatically. If it is not defined, it does not execute automatically.

Auto execute

Auto executes the button when rendered.

Common button

Button alignment

The alignment of the button, either 'Left' or 'Right'.

Icon URL

The URL of the icon to show.

Icon alignment

The alignment of the icon, either 'Left' or 'Right'.

Documentation

Documentation

Documentation intended to explain concepts of its use for future reference.

Customization

Style class

Stylesheet class name. Add any style classes to be applied to the component for the desired styling and rendering.