on 02-16-2011 1:46 PM
Hi,
I have created a tree taking WDR_TEST_EVENTS( component)-->TREE_RECUR_DYNLOAD( view) as reference.
I want to read now the value of leaf ( child element ) when user select it( onAction event). I have written some code but it's not working.
In onaction event method I have written below code.
DATA: lv_nd_node1 TYPE REF TO if_wd_context_node,
lv_el_node1 TYPE REF TO if_wd_context_element,
lv_text TYPE wd_this->element_node1-text.
lv_nd_node1 = wd_context->path_get_node
( path = `TREE1_ROOT.NODE1` ).
lv_el_node1 = lv_nd_node1->get_element( ).----
( this is coming as initial )
lo_el_node1->get_attribute(
EXPORTING
name = `TEXT`
IMPORTING
value = lv_text ).
lv_el_node1 is coming as initial when I select file( leaf) but it's populated when i select folder.
Can any one help in finding error or guiding me to correct solution.
Regards
Anurag
Can you insert a importing parameter context_element to the action handler method and see if it is filled automatically ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Baskaran,
Thanks a lot for help it works perfectly .
Kindly answere two of my queries if you have some time.
1. How you come to know ( any documentation) that this parmeter can be available inside event?
2. why my logic failed to read the attribute? as this is the way we read attribute value!
again thanks a lot.
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.