on 01-12-2009 10:01 AM
Hi all,
I've two checkboxes and two input fields. If i click the first checkbox the second input field should disable and if i click the second one first input field should disable. Is it possible to implement this logic in webdynpro? I'm new to webdynpro..please explain me with a sample code..Useful reply will be rewarded high points.
Regards
Mahathi
Hi mahathi ,
You can refer to standard component WDR_TEST_EVENTS. This will give you a very good idea about checkboxes.
I hope it helps.
Regards
Arjun
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
this is very much possible....
bind the checked property of your checkbox with any boolean attribute.... value in this attribute will come automatically when you check or uncheck the check box.... now create an event and bind with on toggle event of check box..... this event will be called when you check or uncheck the check box..... now depending on the boolean attribute set the enable property of input field....
check the code below.....
method ONACTIONCB2 .
DATA lo_el_context TYPE REF TO if_wd_context_element.
DATA ls_context TYPE wd_this->element_context.
DATA lv_cb1 LIKE ls_context-cb2.
* get element via lead selection
lo_el_context = wd_context->get_element( ).
* get single attribute
lo_el_context->get_attribute(
EXPORTING
name = `CB2`
IMPORTING
value = lv_cb1 ).
DATA lv_ip1 LIKE ls_context-ip1.
* get element via lead selection
lo_el_context = wd_context->get_element( ).
if lv_cb1 eq ABAP_FALSE.
* set single attribute
lo_el_context->set_attribute(
EXPORTING
name = `IP1`
value = ABAP_TRUE ).
ELSEIF lv_cb1 eq ABAP_TRUE.
* set single attribute
lo_el_context->set_attribute(
EXPORTING
name = `IP1`
value = ABAP_FALSE ).
endif.
endmethod.
regards
Pranav
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
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.