QuickStart Radio Group

LANSA WAM

QuickStart - Radio Group

Each entry in a radio button group is defined by an entry in a working list or a set of items hard coded in the radio group properties.

If you use a working list:

To use a working list to define the radio buttons in the group, you need to create a webroutine that specifies a field to store the selected value and the working list of options in the WEB_MAP. When you open the XSL generated for the webroutine in the LANSA Editor:

1.  Click on the Weblets tab, select Standard Weblets from the drop-down list near the top and locate the Radio Group weblet.

2.  Drag the Radio Group weblet onto the field to store the value and release the left-mouse button. (You may want to delete the field description). This will display with default radio button settings.

3.  Click on the weblet to review the Details tab. Notice that the name and value properties have been set to indicate the field you dragged the weblet on to. The value property indicates that on presentation of the web page any value currently in this field will be used to set the selected radio button. When the radio buttons value is changed the appropriate value will be place in the field nominated on the name property – in this case the same field.

Change the listname property to the working list passed on the WEB_MAP. The radio group representation should immediately change to a set of buttons without identifiers.

Set the codefield and captionfield properties to the appropriate fields from the working list.

If you use the items property:

To use a set of items hard coded in the radio group properties, you would need to create a webroutine that specifies a field in its WEB_MAP. When you open the XSL generated for the webroutine in the LANSA Editor:

1.  Click on the Weblets tab, select Standard Weblets from the drop-down list near the top and locate the Radio Group weblet.

2.  Drag the Radio Group weblet onto the field to store the value and release the left-mouse button. (You may want to delete the field description). This will display with default radio button settings.

3.  Click on the weblet to review the Details tab. Notice that the name and value properties have been set to indicate the field you dragged the weblet on to. The value property indicates that on presentation of the web page any value currently in this field will be used to set the selected radio button. When the radio buttons value is changed the appropriate value will be place in the field nominated on the name property – in this case the same field.

4.  Set up the list of items to be used as radio buttons by selecting the ellipses button on the items property. Proceed to define the require entries for the radio buttons.