cancel
Showing results for 
Search instead for 
Did you mean: 

Hide Group elements

Former Member
0 Kudos

Hi all ,

I want to make my Grp UI hide on click of a check box .

How do i do the same .

Pls help

Supriya

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Supriya,

Create one attribute of type WDUI_VISIBILITY and bind it to visible property of Group element.

In check box on_toggle event write code like this...

DATA lo_el_context TYPE REF TO if_wd_context_element.
  DATA ls_context TYPE wd_this->Element_context.
  DATA lv_visible TYPE wd_this->Element_context-visible.

* get element via lead selection
  lo_el_context = wd_context->get_element( ).

* get single attribute
  lo_el_context->set_attribute(
    EXPORTING
      name =  `VISIBLE`
      value = '01' ). // set value according to your req

cheers,

Kris.

Former Member
0 Kudos

Hi Kris ,

I have binded the visibilty attribute to the visible property of Group .

however , in foll syntax .. where do i specify the grp name .

lo_el_context = wd_context->get_element( ).

My grp name is GROUP_7 ..

so if i type as fiollows :

lo_el_context = wd_context->get_element( GROUP_7). .

I get compatibity error .

Supriya

Former Member
0 Kudos

Hi Supriya,

Once you have binded your visibility attribute "GROUP7_VISIBILITY" to the visible property of your group "GROUP_7", then you have can control the visibility of the Group by setting the value of "GROUP7_VISIBILITY". Try the following code.

lo_el_context->set_attribute(

EXPORTING

name = `GROUP7_VISIBILITY`

value = '02' ).

I hope this helps in resloving your issue. Let us know if you have any issues.

Regards,

Gopal.

Former Member
0 Kudos

Hi ,

I have binded my grp with the Node VISIBILE with an attribute VISIBILE .

In my Toggle event of check box ,

i have foll code

DATA : lo_el_context TYPE REF TO if_wd_context_element.

DATA ls_context TYPE wd_this->element_visible.

DATA lv_visible TYPE wd_this->element_visible-visible.

  • get element via lead selection

lo_el_context = wd_context->get_element( ).

lo_el_context->set_attribute(

EXPORTING

value = '02'

name = 'VISIBLE').

.. but on my chk box click i am getting runtime

The following error text was processed in the system TD1 : Could not find attribute VISIBLE

Whr M i going wrong

Lukas_Weigelt
Active Contributor
0 Kudos

Sometimes in your post you write "VISIBLE" and sometimes "VISIBILE". Sure it's not a typo? Maybe you actually named your attribute "VISIBILE" 😜

Former Member
0 Kudos

Hi ,

There was some problem in binding ...

I did the binding again in the context and it worked fine

Thanks for ur help

Supriya

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Supriya,

For hiding the Group UI element, you can bind the Visble property to an attribute of type "WDUI_VISIBILITY". On click of the checkbox you can set your attribute value to "NONE". I hope this will help you. Let me know if you require any further information.

Regards,

Gopal.

Former Member
0 Kudos

HI Supriya,

Create a context attribute of type WDUI_VISIBILITY and bind it to the visible property of the Group UI element.

Then on click of the button(i.e in the action handler), set the context attribute with values based on the requirement.

02 = visible

01 = none.

Thanks,

Aditya.