on 09-16-2011 6:25 PM
Hello All,
I've been looking at view RADIOBTNGRPBYKEY in component WDR_TEST_EVENTS and and the GROUP2 group element contains a radio button element of type RadioButtonGroupByKey. I simply cannot find anywhere in this views context or methods on how the actual buttons are defined. I thought when I started this task I would be able to right click on the RadioButtonGroupByKey element and insert radio button elements under it. This has been a frustrating mystery to me and if anyone can tell be how the actual buttons are defined under a RadioButtonGroupByKey type element I would be eternally grateful.
Thank you in advance,
Joe
hi joseph,
Once you bind the selected key property of RGBK to attribute. you have to provide set of values to that attribute. Then the radio button will display.
For example
create one node say NODE and attribute ATT.
now in view create one radio button group by key and bind selected key property to ATT attribute.
now we have to provide values to ATT.
write below code in wddoinit method.
DATA: NODE_INFO TYPE REF TO IF_WD_CONTEXT_NODE_INFO.
NODE_INFO = WD_CONTEXT->GET_NODE_INFO( ).
NODE_INFO = NODE_INFO->GET_CHILD_NODE('NODE').
DATA: LT_VALUESET TYPE WDR_CONTEXT_ATTR_VALUE_LIST,
L_VALUE TYPE WDR_CONTEXT_ATTR_VALUE.
L_VALUE-VALUE = '30'.
L_VALUE-TEXT = 'Casual Leave'.
INSERT L_VALUE INTO TABLE LT_VALUESET.
L_VALUE-VALUE = '20'.
L_VALUE-TEXT = 'Sick Leave'.
INSERT L_VALUE INTO TABLE LT_VALUESET.
L_VALUE-VALUE = '10'.
L_VALUE-TEXT = ' Priviliged Leave'.
INSERT L_VALUE INTO TABLE LT_VALUESET.
NODE_INFO->SET_ATTRIBUTE_VALUE_SET( NAME = 'ATT' VALUE_SET = LT_VALUESET ).
now you will see the radio button when you execute the application.
() casual leave () sick leave () priviliged leave
hope this helps
Regards
Srinivas
Edited by: sanasrinivas on Sep 17, 2011 7:18 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.