on 08-06-2008 9:27 AM
hi experts,
i have binded a context of wdui_visibility type to a ui element. now i want to change this visibilty property at run time. i have written the folling code:
data lo_nd_visible type ref to if_wd_context_node.
data lo_el_visible type ref to if_wd_context_element.
data ls_visible type wd_this->element_visible.
data lv_visibility like ls_visible-visibility.
navigate from <CONTEXT> to <VISIBLE> via lead selection
lo_nd_visible = wd_context->get_child_node( name =
wd_this->wdctx_visible ).
get element via lead selection
lo_el_visible = lo_nd_visible->get_element( ).
get single attribute
lo_el_visible->get_attribute(
exporting
name = `VISIBILITY`
importing
value = lv_visibility ).
wd_context->set_attribute( EXPORTING name = 'VISIBILITY' value =
abap_false ).
but it is giving a rum time error. the erroe message is : No context named visibility found.
please can anyone provide me the correct code.
thank you.
Hi
Since you are accesing the node containing the 'VISIBILITY' attribute you can use the following method to set the value
lo_el_visible->set_attribute(
exporting
name = `VISIBILITY`
value = 01 ). ""01 - none,02-visible
and remove this code
wd_context->set_attribute( EXPORTING name = 'VISIBILITY' value =
abap_false ).
Regards
Tamil
Edited by: Tamilselvan K on Aug 6, 2008 2:40 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You have mis-spelled the context attribute name VISIBILITY please check.
and the possible values are ( not abap_false and true )
if_wdl_core=>visibility_visible
if_wdl_core=>visibility_none
Abhi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
11 | |
10 | |
9 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.