Skip to Content
avatar image
Former Member

How to Show/hide the UI Elements in a WD Application

Hi,

I need to show/hide and control other properties such as required, readonly etc from UI.

Can somebody please tell me how I can do that as I am able to save and retrieve the fields from another UI, now the need is to apply them once the Application starts.

Thanks,

Rachit

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Oct 15, 2008 at 01:32 PM

    If I understand the question correctly to control the properties of UI element there are two ways.

    1) Directly change the value in the doModify:

    Eg to hide/show a transparent container:

    constants: lc_visible type wdui_visibility value '02',

    lc_hidden type wdui_visibility value '01'.

    data: lcl_wd_tc type ref to cl_wd_transparent_container.

    lcl_wd_tc ?= view->get_element( 'TC_DATA' ).

    lcl_wd_tc->set_visible( exporting value = lc_visible ).

    2) OR you could create a context node of type wdui_visibility, bind it to the visible property of the UI element. Set the default to visible and you can change that value in the logic.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 16, 2008 at 01:35 AM

    Hi,

    To show/hide UI elements follow below procedure.

    1) define a attribute(VISIBLE in this case) element in the context of type WDUI_VISIBILITY

    2) in the UI element properties(Visible) bind the above attribute with the element you want to make visible/Hide.

    3) call below method to hide the UI element

    wd_context->set_attribute(

    EXPORTING

    name = 'VISIBLE'

    value = cl_wd_uielement=>e_visible-none ).

    4) wd_context->set_attribute(

    EXPORTING

    name = 'VISIBLE'

    value = cl_wd_uielement=>e_visible-visible ). for display.

    You have to call these method at the right spot.

    Thanks,

    Sree.

    Edited by: t sree on Oct 16, 2008 3:36 AM

    Add comment
    10|10000 characters needed characters exceeded