on 02-11-2011 9:00 AM
Hi all,
can u tell me what is the use of enable property and key to select property in radiobutton when we need to use these two properties.
Thanks & Regards,
Naveen
Enable property as the name suggest is used for enabling or disabling the UI element as such.
if it is set to abap_false you cannot perform any action on the UI element.
Each Ui element has this property.
next is key to select. This is the porperty of radio button.
it is set to some specific value and some string value say "X"
then when ever you select the radio button the context attribute bound to the selected key will have its value set to "X".
thanks
sarbjeet singh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sarbjeet,
but if i am giving the value to key to select 1 2 3 suppose i am having three radiobuttons a b c for these three radiobuttons for key to select property for a i am passing 1 for b>2 for c>3 then what i am seeing the output is if i am not passing the values by default all three radiobuttons are been selected when i am passing values to key to select then the default selection is going.
can i take for this purpose we can use the key to select property.
Thanks & Regards,
Naveen
Hi,
I didnt get you properly. But here is how it works:
suppose you have 3 radiobuttons. The values for keyToSelect property of those 3 radiobuttons are a,b and c correspondingly. you need to have a context attribute to which you bind selectedKey property of all the radiobuttons.
And say you want to select first radio button, set the context attribute value to a.
Hope this clarifies.
Thanks,
Srilatha
Edited by: Srilatha M on Feb 11, 2011 10:54 AM
HI
in the case when you are not passing anything
then key to select will be null.
and initially selected key attribute's value is also null.
as both are equal then radio button will be selected automatically.
see if you pass 1 to radio button's key to select and
in the code you set the attribute which is bound to selected key to 1.
wd_context->set_attribute(
name = 'val'
value = '1'
).
then radio button will get selected automatically.
SO as initially nothing is there in the value of the attribute
and nothing is in the key to select property
thats why it was gettign selected.
thanks
sarbjeet singh
Hi Naveen,
Please see the help [http://help.sap.com/saphelp_nw70ehp1/helpdata/en/64/99c941c04cc317e10000000a155106/content.htm|http://help.sap.com/saphelp_nw70ehp1/helpdata/en/64/99c941c04cc317e10000000a155106/content.htm]
Enable property is same as in other UI property to controle if that UI element is enabled to the user for actions.
Key to select property is bit abstract to explain. See the wdr_test_events component, radiobutton view. If you see the example you would understand it better.
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 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.