Hi
I created tree node, i am able to display data in that node, But collapse is not working.
i kept this part of code in collapse event, event is triggering, but it is not collapsing.
DATA: lr_node TYPE REF TO if_bsp_wd_tree_node,
lv_size TYPE sytabix,
lv_index TYPE sytabix VALUE 1.
DATA: lv_event_thtmlb TYPE REF TO cl_thtmlb_tree.
TRY.
lv_event_thtmlb ?= htmlb_event_ex.
typed_context->querynetrs->collapse_node( lv_event_thtmlb->row_key ).
CATCH cx_root.
ENDTRY.
( or below part)
DESCRIBE TABLE me->typed_context->querynetrs->node_tab LINES lv_size.
WHILE lv_index <= lv_size.
lr_node = me->typed_context->querynetrs->get_node_by_index( lv_index ).
IF lr_node IS NOT INITIAL.
lr_node->collaps_node( ).
ENDIF.
lv_index = lv_index + 1.
ENDWHILE.
please let me know why collapse is not working.
thanks
ram.
ram
HI Ram,
did you try to do a reread afterwards?
If you look at the component IBHIER view TreeEnhanced it uses a global variable node_modified that is set after the collapse.
Then afterwards in the DO_PREPARE_OUTPUT this variable is checked and used to reread the entity.
IF me->node_modified = abap_true AND me->entity IS BOUND.
me->entity->reread( ).
ENDIF.
Maybe also add this part of coding in your method and in the DO_PREPARE_OUTPUT.
KR,
Micha
Add a comment