on 10-15-2008 2:06 PM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
80 | |
24 | |
11 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.