on 01-15-2009 5:21 PM
Hello experts,
I'm new to WDA, could you tell me how to accomplish this task:
I have a Dropdown element that should be enabled/disabled when another element - a checkbox is checked/unchecked. I already have everything in the layout, and I know to work on the method but I dont know how the element's attribute (dropdown) is changed inside the checkbox's method.
Thanks in advance.
Thanks Thomas, your sample helped a lot...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Just data bind a context attribute to the DDLB enabled property. Then from within the action handler of the checkbox you only need to change the context attribute value.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It is just a normal context attribute. There is nothing special about it just becuase it is bound to the DDLB. Here is some sample code of setting a context attribute:
DATA lo_nd_meeting TYPE REF TO if_wd_context_node.
DATA lo_el_meeting TYPE REF TO if_wd_context_element.
DATA ls_meeting TYPE wd_this->element_meeting.
DATA lv_meeting_id TYPE wd_this->element_meeting-meeting_id.
* navigate from <CONTEXT> to <MEETING> via lead selection
lo_nd_meeting = wd_context->get_child_node( name = wd_this->wdctx_meeting ).
* get element via lead selection
lo_el_meeting = lo_nd_meeting->get_element( ).
lv_meeting_id = 1.
* set single attribute
lo_el_meeting->set_attribute(
name = `MEETING_ID`
value = lv_meeting_id ).
Here I am setting a meeting id attribute to 1, you would be setting your enabled attribute to true or false.
Hi Ricky,
Just bind the onToggle event of the check box with any action, say name of the action is onCheck, now when you check or uncheck the check box the code will automatically goes to onCheck action.... here you can write the code to enable and disable the drop down... the code has been given by Thomas....
you have to just set the enable property...
regards
Pranav
User | Count |
---|---|
87 | |
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.