on 03-10-2009 8:05 AM
Hi ,
I am working on Webdynpro ABAP application . I want to enable button on the value of the drop down.
Could any one help me on this. I have done following steps
1.Created onselect action for dropdown by key
2.Created context attribute with wdy_boolean type.
3. checking in the on select action if the value is entered and then seting attribute to 'X'
but still not working
Thanks
K
Hi Kiran,
Check if you have done the following steps:
- create an onselect method for drop down.
- create a context attribute of wdy_boolean type and bind it with the enabled property of the button.
- in the onselect method of the drop down, read the attribute that is binded to the drop down.
Check if it is not initial, set the value of the attribute as 'X'.
If still it is not working, Put a break point in the onselect method and see if that method is getting triggered.
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 Kiran,
Refer this code
method ONACTIONONSELECT .
DATA lo_nd_cn_visa TYPE REF TO if_wd_context_node.
DATA lo_el_cn_visa TYPE REF TO if_wd_context_element.
DATA ls_cn_visa TYPE wd_this->element_cn_visa.
DATA lv_ca_visa TYPE wd_this->element_cn_visa-ca_visa.
* navigate from <CONTEXT> to <CN_visa> via lead selection
lo_nd_cn_visa = wd_context->get_child_node( name = wd_this->wdctx_cn_visa ).
* get element via lead selection
lo_el_cn_visa = lo_nd_cn_visa->get_element( ).
* @TODO handle not set lead selection
IF lo_el_cn_visa IS INITIAL.
ENDIF.
* get single attribute
lo_el_cn_visa->get_attribute(
EXPORTING
name = `CA_visa`
IMPORTING
value = lv_ca_visa ).
if lv_ca_visa eq 'X'. " I am assuming that the value which is selected in drop down has a key 'X'.
DATA lo_el_context TYPE REF TO if_wd_context_element.
DATA ls_context TYPE wd_this->element_context.
DATA lv_ca_enable TYPE wd_this->element_context-ca_enable.
* get element via lead selection
lo_el_context = wd_context->get_element( ).
* @TODO handle not set lead selection
IF lo_el_context IS INITIAL.
ENDIF.
* set single attribute
lo_el_context->set_attribute(
name = `CA_ENABLE`
value = 'X' ).
endif.
endmethod.
I hope it helps.
Regards
Arjun
User | Count |
---|---|
95 | |
11 | |
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.