← Back to plugin index

Radio Buttons UI Element

Description
Displays radio buttons.
Type name
ConfigurableUiRadio
Class
com.airlock.iam.flow.ui.application.configuration.configurable.ConfigurableUiRadioConfig
May be used by
Properties
Label (label)
Description
Label for the radio button. The UI treats it as a key to translate. If there is no translation, the configured value is what is shown in the UI.
Attributes
String
Mandatory
Validation RegEx: [a-zA-Z0-9]+((\.|-)[a-zA-Z0-9]+)*
Property (property)
Description
The property of the radio button. This property will be sent to the server via REST as part of a JSON object. For example, if the property name is 'gender' and the options allow one of the values 'male' or 'female' with 'female' being chosen, the JSON sent to the server will be as follows: {"gender": "female"}.
Attributes
String
Mandatory
Validation RegEx: [a-zA-Z0-9_]+(\.[a-zA-Z0-9_]+)*
Example
gender
Example
deviceType
Required (required)
Description
Requires a value to be chosen.
Attributes
Plugin-Link
Optional
Assignable plugins
Inline (inline)
Description
Whether all radio button options should be rendered on one horizontal line or not.
Attributes
Boolean
Optional
Default value
true
Options (options)
Description
Defines the list options to choose from.
Attributes
Plugin-List
Mandatory
Assignable plugins
HTML ID (htmlId)
Description
The ID of the element in the HTML. If no ID is set, the 'property' is used as the ID.
Attributes
String
Optional
Validation RegEx: [a-zA-Z0-9_]+
Submit To Server (submitToServer)
Description
If enabled, this value is submitted to the server. Otherwise, it is only used locally (e.g. to confirm inputs of other fields).
Attributes
Boolean
Optional
Default value
true
Initial Value Query (initialValueQuery)
Description
JSONPath query to fetch the field value from the initial REST call response. Requires an initial REST call to be configured in this custom step UI. If the query yields multiple results, the first one is set as the initial value and all others are discarded.

See the JSONPath documentation for the full documentation: https://github.com/dchester/jsonpath

Examples:

Assume the initial REST call returns the following JSON response:

{
 "meta": {
   "type": "jsonapi.metadata.document",
   "timestamp": "2023-03-10T13:06:01.294+02:00"
 },
 "data": [
  {
    "type": "user",
    "id": "user1",
    "attributes": {
      "contextData": {
         "givenname": "User1",
         "surname": "FSMTest",
         "roles": "customerA"
      }
    }
  },
  {
    "type": "user",
    "id": "user2",
    "attributes": {
      "contextData": {
        "givenname": "User2",
        "surname": "FSMTest",
        "roles": "customerB"
      }
    }
  }
 ]
}

The following table shows the results of various JSONPath queries given the JSON above:

Description JSONPath Query Extracted Initial Value Static path from the root $.meta.type jsonapi.metadata.document The role of the user whose id equals "user1" $.data[?(@.id == 'user1')].attributes.contextData.roles customer The number of users $.data.length 2 All "givenname" attributes
Note:
This query yields multiple results.
The first one is set to the initial value, the rest is discarded. $..givenname User1
Attributes
String
Optional
Example
$.store.bicycle.color
Example
$..phoneNumber
Example
$..data[?(@.id == 'language')].attributes.currentValue
YAML Template (with default values)

type: ConfigurableUiRadio
id: ConfigurableUiRadio-xxxxxx
displayName: 
comment: 
properties:
  htmlId:
  initialValueQuery:
  inline: true
  label:
  options:
  property:
  required:
  submitToServer: true