dynamic-radio-and-button-group
Reactive icon

Dynamic Radio and Button Group

version 1.0.0 (Compatible with OutSystems 11)
Uploaded on 4 Apr by 
0.0
 (0 ratings)
dynamic-radio-and-button-group

Dynamic Radio and Button Group

Documentation
1.0.0
Context
The present OutSystems Forge component is designed to allow the creation of radio and button groups that are populated using a list.  
The radio and button groups included in Service Studio have to be hardcoded during the development process, and can't be easily changed at runtime, to overcome this limitation we developed this component that not only allows populating the group using a list, but also allows this list to be dynamic and to be changed at runtime. As such, it allows the developer to create a radio group from a database entities for example.
There are two key differences from these button groups to the ones included in OutSystems, the first is that the group has to be populated with a list, and the second is that the field value has to be of type 'text'


How to use

Install this component and add the dependencies to the app where you want to use it.

There are two widgets available, one for Radio Group, and another for Button Group:

Inputs

There are 3 inputs to the widget:

  • ButtonsList (required): this is a list of records with two attributes, ButtonText and ButtonValue, this is the list that will be used to populate de button group.
  • Enabled: this variable is optional, and is used to enable or disable the group
  • CurrentValue: this variable is optional, and is used when the developer wishes to change the selected value using external logic


Event

There is an event called "ButtonChanged", this event needs a handler on the parent element, so that the selected button value can be passed to it.