on 06-16-2012 7:02 AM
Hi Friends,
I am using UI element Radiobutton Group by Index Ui element , if the user selects the one radiobutton the remaining two radiobuttons should be invisible. Can any Body give the code How to disable the two radiobuttons based on index.
Thanks,
Raghunadh .K
Hello Raghunath,
You need to define an attribute type boolean with default value 'X' .and then you need to bind the VISIBLE property of the Radio Buttons that you need to hide.
If on selecting a radio button you need to hide other radio buttons.
Then you need to create an action on the radio button( selecting which other 2 radio buttons will be hidden)
In this code you need to Change the value of the attribute(binded to visible property of Other radio buttons ) to ' '.
Thanks and regards,
Gaur Mayank
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
write the code.
data ln_value type ref to if_wd_context_node.
data lt_value type table of if_componentcontroller=>element_value.
data ls_value type if_componentcontroller=>element_value.
ln_value = wd_context->get_child_node( name = 'VALUE' ).
ls_value-values = '1st Radio'.
append ls_value to lt_value.
clear ls_value.
ls_value-values = '2nd Radio'.
append ls_value to lt_value.
clear ls_value.
ls_value-values = '3rd Radio'.
append ls_value to lt_value.
clear ls_value.
ln_value->bind_table( lt_value ).
Now create an action on event'ONSELECT' in radio button property.
there .
In that action write the following code.
data ln_value type ref to if_wd_context_node.
data lt_value type table of if_componentcontroller=>element_value.
data ls_value type if_componentcontroller=>element_value.
ln_value = wd_context->get_child_node( name = 'VALUE' ).
le_value->GET_STATIC_ATTRIBUTES(
IMPORTING
STATIC_ATTRIBUTES = ls_value ).
*********************************************************************
IF le_value = ln_value->GET_ELEMENT( INDEX = 1 )
ls_value-values = '1st Radio'.
append ls_value to lt_value.
clear ls_value.
ln_value->bind_table( lt_value ).
endif.
For others, Also you can do the same.
Thanks and regards,
Gaur Mayank
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
78 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
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.