on 09-18-2009 7:02 AM
hi experts,
Iam having a view say (V1). in V1 i do have 2 buttons in invisible mode. Iam using that V1 in V2 (in viewuielement container). in v2 i need to make those 2 buttons visible. please guide me in this.
Regards,
murthy.
Hi,
Create an atribute of wdui_visibility type and bind it with the visible property of the buttons. Now in the WDDOINITuse this code:
DATA lo_api_v_completed TYPE REF TO if_wd_view_controller.
lo_api_v_completed = wd_this->wd_get_api( ).
DATA lr_rr_view_usage TYPE REF TO if_wd_rr_view_usage.
lr_rr_view_usage = lo_api_v_completed->get_view_usage( ).
DATA: lr_rr_view TYPE REF TO if_wd_rr_view,
lv_name TYPE string.
lr_rr_view = lr_rr_view_usage->get_view( ).
lv_name = lr_rr_view->get_name( ). "this will give you the active view name
if lv_name eq 'V2'.
" make the buttons visible by setting the attribute 02 with the help of code wizard.
else
" make the buttons invisible by setting the attribute 01 with the help of code wizard.
endif.
use this code in WDDOINIT method of both the views.
I hope it helps.
Regards
Arjun
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Make the attribute of type WDUI_VISIBILITY in component controllerand map that attribute in both of ur view.Bind the button
visibility property with that attribute. Now based on ur condtion with which u are going to ur view V2, say on click of a button then set
the value of the attribute to 02, for visible.
Regards,
Pankaj Aggarwal.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
9 | |
8 | |
6 | |
6 | |
6 | |
5 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.