cancel
Showing results for 
Search instead for 
Did you mean: 

Doubt regarding Radio Button

raji_v
Explorer
0 Kudos

Hi All,

I have a doubt regarding the ui elements.What is the need of single radio button.Generally radiobuttons are used as group.For this we have radiobuttongroupbyindex and radiobuttongroupbykey.I am unable to understand the need of single radio button.Can anybody clarify my doubt.If the single radio button is useful explain me the properties keytoselect and selectedkey.

Thanks in Advance.

Accepted Solutions (0)

Answers (3)

Answers (3)

arjun_thakur
Active Contributor
0 Kudos

Hi Raji,

Single radio buttons are used when wehave to design a view where radio buttons are not displayed together. In that case radio button by key and radio button by index will be difficult to use as in both of that the radio buttons are displayed together (in a group).

You should refer this [article|https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/b06c8c9a-19a4-2b10-d985-9ae7a4383478] and also refer the standard component WDR_TEST_EVENTS. These will make things much clearer.

I hope it helps.

Regards

Arjun

Former Member
0 Kudos

Helo raji,

Instead of use a single radio button, you must use a checkbox to set the state (enabled/disabled, for example).

Regards.

Former Member
0 Kudos

hi,

RadioButton

The RadioButton UI element is a button with two states (on/off) that enables users to select options. The

RadioButton allows you to spread the displayed radio buttons individually on the screen instead of grouping

them in a table. You can toggle the radio button when you bind the UI elements to the same context attribute.

The radio button is selected if the context attribute to which the selectedKey property is bound contains

the value of the key that belongs to this radio button. The key is specified by property keyToSelect.

Properties

u2022 activateAccessKey. Indicates whether access key for this control is activated.

u2022 explanation. determines the explanation text. explanation is maintained by the documentation

developer in the Web Dynpro Authoring environment.

u2022 keyToSelect. This property specifies the value of the key used to select this radio button.

u2022 selectedKey. Specifies the path of the context attribute that stores the selected key.

u2022 readOnly. Specifies whether or not the user can make selections in the checkbox.

u2022 state. Describes the error status of the UI element. The data type of this property corresponds to

enumeration type WDState. You can use the following values in the application:

normal Describes the default state of the UI element.

required Specifies whether the entered value is required, the UI element is

displayed with an asterisk.

u2022 text. This property describes the text next to the radio button.

u2022 textDirection. Specifies the text direction and allows you to use a radio button for texts in languages

which require a specific text direction. Property textDirection can take the following values and is

represented by enumeration type WDTextDirection.

The default value for this property is inherit.

inherit

The text direction is inherited from the parent element. The text

direction is therefore identical to that of the parent element.

ltr The text runs from left to right.

rtl The text runs from right to left.

Regards,

Siva