on 04-02-2014 9:42 AM
While creating radio buttons there is a confusion regarding two properties "Key to Select" and "Selected Key".Can anybody explain it with example?
Thanks,
Vimal
Hi Vimal,
Please find my explanation as below
Key to Select: This is the unique key for each radio button to identify which one is selected
Selected Key: This holds the "KEY" of selected radio button
Example:
Let us say we have 2 radio buttons : Male & Female
Create a context attribute SELECTED_KEY of type STRING.
Create an action ON_SELECT for radio button select event
Now,
the properties for "MALE" radio button as below
KEY_TO_SELECT = 'M'
SELECTED_KEY = "bind to the context attribute SELECTED_KEY
OnSelect = 'ON_SELECT'.
The properties for 'Female" radio button as below
KEY_TO_SELECT = 'F'
SELECTED_KEY = "bind to the context attribute SELECTED_KEY
OnSelect = 'ON_SELECT'.
If we select radio button 'Male', we get the key as 'M' and for 'Female' radio button 'F'.
check inside the event handler method ONACTIONON_SELECT, you get the 'KEY' of selected radio button.
So, the context attribute 'SELECTED_KEY' gets filled with the key of selected radio button
Hope this helps you in distinguishing the 'KEY TO SELECT' & 'SELECTED KEY' .
Regards,
Rama
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vimal,
Key To Select:- This give the value of the key (field) used for selection of this radio button
and Selected Key:- This specifies the path of the context attributes that has the present field(key).
To get a better understanding have a look at the predefined WDA components like WDR_TEST_UI_ELEMENTS.
Have look into the help.sap.com as well for WDA 'radio buttons by key'.
(I think you can understand better by taking a practical tour of this)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Check this help: RadioButton Properties - Web Dynpro for ABAP - SAP Library
Selected Key is the property which holds the selected value of radio button and this is a mandatory property.
Key to select is the value of key used to select the radio button( this is optional and bindable).
Regards,
Kiran
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.