cancel
Showing results for 
Search instead for 
Did you mean: 

UI element 'Radiobutton' behaviour

former_member450736
Active Participant
0 Kudos

Hi,

I have two radiobuttons UI elements under transparent container, i have bound these radio buttons to context attributes r1 and r2 respectively.

how can i make one of the radio buttons enabled. because by default both are selected ( though in radio buttons one should be selected ).

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

See the Help [http://help.sap.com/saphelp_nw70ehp1/helpdata/en/c0/e8884118aa1709e10000000a155106/content.htm|http://help.sap.com/saphelp_nw70ehp1/helpdata/en/c0/e8884118aa1709e10000000a155106/content.htm]

I think your both context attributes r1 and r2 are having the values matching the keyToSelect property of the radio button.

former_member450736
Active Participant
0 Kudos

i read the documentation, however i dont see what is the value ( X or space ) of my attributes r1 and r2, inorder to make one enabled, even X or space is not working.

i am not sure what should i pass even if i bind keytoselect property to other attributes say r3 and r4.

Former Member
0 Kudos

Hi,

Shouldnt you use a radiobuttongroup component?

Regards,

Mathieu

Former Member
0 Kudos

Hi,

I have done a very small test.

I have a context attributes

R1 type wdy_boolean

R2 type wdy_boolean

R1_txt type string default value is X.

R2_txt type string dafault value is space.

Created a view same as you described.

Bind r1 and r2 to the selectedKey

Bind r1_txt,r2_txt to the keyToselect properties.

Run the application.

I see Radiobtn r1 is not slected and RadioBtn r2 is selected.

The reason was that the R2 value was space and that matches the value of R2_txt.

Note: SelectedKey type is string, so it does not have to be a boolean . You can bind any string type. If the value is matches with the keyToSelect then it will be On, all other combinations it is off.

Answers (0)