on 05-14-2010 10:22 AM
hi
Is it possible to disable 1 or 2 radiobuttons of the same group ,based on some conditions? I want other radiobuttons to be in active status, but user should not be able to select only 1 radiobutton.
r1
r2
r3
r4
.....
out of these r1 and r3 should be disabled while r2 and r4 should be active at that time.
Is it possible in Webdynpro??
ags.
Hi,
If you are using RADIOBUTTONGROUPBYINDEX, then you can select the radiobutton you
want under RADIOBUTTONGROUPBYINDEX to disable and uncheck enabled property.
Regards and Best wishes.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI,
By setting a attribute for the seperate validation in the node you can decide which button to be
displayed and which one to hide.
The below code i have written in WDDOINIT method of my view
DATA :
NODE TYPE REF TO IF_WD_CONTEXT_NODE,
W_INDEX TYPE I,
W_TEXT TYPE STRING,
LIST TYPE STANDARD TABLE OF IF_MAIN=>ELEMENT_RADIOBUTTON,
W_LIST LIKE LINE OF LIST.
* Appending elements to "itemList"
W_LIST-EBELN = 'SYDNEY'.
APPEND W_LIST TO LIST.
W_LIST-EBELN = 'BRISBAIN'.
APPEND W_LIST TO LIST.
" Here say i want to hide PERTH if condtion fails so i will use the attribute value
if <attribute> eq <required value>
W_LIST-EBELN = 'PERTH'.
APPEND W_LIST TO LIST.
endif.
NODE = WD_CONTEXT->GET_CHILD_NODE( NAME = `RADIOBUTTON` ).
NODE->BIND_TABLE( LIST ).
NODE->SET_LEAD_SELECTION_INDEX( 1 ). " Always keep the index number that is not hidden otherwise it will go dump
W_INDEX = NODE->GET_LEAD_SELECTION_INDEX( ).
CLEAR W_LIST.
READ TABLE LIST INTO W_LIST INDEX W_INDEX.
W_TEXT = W_LIST-EBELN.
WD_CONTEXT->SET_ATTRIBUTE( EXPORTING VALUE = W_TEXT NAME = 'VIEWTEXT' ).
Hope it helps.
Regards and Best wishes.
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
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.