cancel
Showing results for 
Search instead for 
Did you mean: 

Make whole "Group" invisible

former_member246634
Active Participant
0 Kudos

Hi guys,

I have Group (this group contains two elements: Caption and Table) in my TransparentContainer and I want to make it invisible. I've created new node in Context with Attribute of "WDUI_VISIBILITY" type and bound it to Visible parameter of my Group.

Can you provide some code to make whole group invisible or if it is not possible aby other way to make elements of Group invisible?

Thanks in advance

Bartlomiej

Accepted Solutions (1)

Accepted Solutions (1)

rajeshkothamasu
Active Participant
0 Kudos

Hi,

I was taking "visibility" as a context node and having one attribute text( property : WDUI_VISIBILITY )

find below code to make group as invisible (02 : visible 01: Invisible).

   DATA lo_nd_visibility TYPE REF TO if_wd_context_node.

   DATA lo_el_visibility TYPE REF TO if_wd_context_element.
   DATA ls_visibility TYPE wd_this->Element_visibility.


    lo_nd_visibility = wd_context->get_child_node( name = wd_this->wdctx_visibility ).


    lo_el_visibility = lo_nd_visibility->get_element( ).


    ls_visibility-text = '01'.


    lo_el_visibility->set_static_attributes(
       static_attributes = ls_visibility ).



Answers (1)

Answers (1)

former_member184578
Active Contributor
0 Kudos

Hi,

Set the attribute to which you bound the visibility property to '01' to make it invisible ( and '02' to make it visible back) using set_attribute( ) method of the context element.

  DATA lo_nd_node TYPE REF TO if_wd_context_node.

   DATA lo_el_node TYPE REF TO if_wd_context_element.

   lo_nd_node = wd_context->get_child_node( name = 'NODE' ). " NODE is the name of context node in which attr is created

   lo_el_node = lo_nd_node->get_element( ).

if <cond> " Condition to make it invisible

   lo_el_node->set_attribute(

     name `VISIBILITY`     " attribute name to which visibility is bound

     value '01' ).


else.


  lo_el_node->set_attribute(

     name `VISIBILITY`

     value '02' ).


endif.

Regards,

Kiran