cancel
Showing results for 
Search instead for 
Did you mean: 

TABLE POPIN - Expand All / Collapse ALL

Former Member
0 Kudos

I have a Table with a Table POPIN (TablePopinToggleCell). It is working fine. Each Row gets expanded when I click it, and collapsed when clicked.

QUESTION:

Is there some property that provides Expand All / Collapse All for a TABLE POPIN? I see this Expand All/Collapse All ICON when using other table elements (e.g. the Icon you see on WDR_TEST_TABLE, Table Row Grouping) ?

Thanks,

- Tim

Accepted Solutions (0)

Answers (1)

Answers (1)

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

I don't think there is anything built in. I generally bind the selectedPopin property of the table to a context attribute. This way you can easy control the expand/collapse state of the popin using this attribute in each element. So for Expand/Collapse all I would do the following

Expand All:

data lt_elem_set type wdr_context_element_set.
  field-symbols <ls_elem> like line of lt_elem_set.
  lt_elem_set = wd_context->get_child_node( name = wd_this->wdctx_course_assign )->get_elements(  ).

  loop at lt_elem_set assigning <ls_elem>.
    <ls_elem>->set_attribute(
      exporting
        name =  `POPIN_SELECTED`
        value = `TABLEPOPIN` ).
  endloop.

Collapse all is the same except the value is ``. You could also write one block and pass the value into it.

Former Member
0 Kudos

Thanks Mr. Jung. As always, you da' man.

- Tim

Former Member
0 Kudos

Thanks, Thomas Jung!

Maria

Former Member
0 Kudos

Hi thomas,

I am faceing the problem to add the trasparent container to the table popin.

my code:

lv_uielement_id = lv_uielement_id_prefix && '_POPIN_CNTR'. "#EC NOTEXT

lr_transparent_container = cl_wd_transparent_container=>new_transparent_container(

id = lv_uielement_id "'TRANSPARENT_CONTAINER1'

height = '100%' "#EC NOTEXT

width = '100%'

accessibility_descr = 'TRANS_ACC'

is_layout_container = 'X' "#EC NOTEXT

view = view

).

DATA l_popin_layout TYPE REF TO cl_wd_matrix_layout.

l_popin_layout = cl_wd_matrix_layout=>new_matrix_layout( container = lr_transparent_container ).

lr_transparent_container->set_layout( l_popin_layout ).

DATA: l_item_node TYPE REF TO if_wd_context_node.

l_item_node = l_node->get_child_node( 'SUB' ).

l_popin = cl_wd_table_popin=>new_table_popin(

id = 'POPIN'

on_close = 'CLOSE_POPIN' ).

IF l_item_node IS BOUND.

cl_wd_dynamic_tool=>create_table_from_node(

EXPORTING ui_parent = lr_transparent_container

table_id = 'MULTIV_TAB'

node = l_item_node

RECEIVING table = lr_table_in_table_popin ).

ENDIF.

"Add the Transparent Container to the Table Popin

l_popin->set_content( lr_transparent_container ).

" add popin to column

l_new_col->set_popin( l_popin ).

Here I am getting the null object refference dump in this method. l_popin->set_content( lr_transparent_container ).

Please correct me if I wrong for the above code.