on 11-08-2008 7:09 AM
hi dynpro guru,
I am new in WDA , Plz tell me how to create a pop up window in web dynpro?
regards
sapy
Hi,
try to this code.....
DATA: lt_text type string_table.
DATA: mr_popup_window TYPE REF TO if_wd_window.
pop a confirmation window for display purpose
DATA: l_window_manager TYPE REF TO if_wd_window_manager,
l_cmp_api TYPE REF TO if_wd_component,
l_window TYPE REF TO if_wd_window.
l_cmp_api = wd_comp_controller->wd_get_api( ).
l_window_manager = l_cmp_api->get_window_manager( ).
append 'DO YOU WANNA SAVE DATA' to lt_text.
CALL METHOD l_window_manager->create_popup_to_confirm
EXPORTING
text = lt_text
button_kind = if_wd_window=>co_buttons_yesno
CLOSE_BUTTON = ''
WINDOW_TITLE = 'WINDOW TITLE'
WINDOW_WIDTH = '25'
WINDOW_HEIGHT = '50'
WINDOW_LEFT_POSITION = 10
WINDOW_TOP_POSITION = 10
WINDOW_POSITION = '25'
RECEIVING
result = mr_popup_window.
associated the action handling methods with the window
DATA: view_controller TYPE REF TO if_wd_view_controller.
view_controller = wd_this->wd_get_api( ).
CALL METHOD mr_popup_window->SET_WINDOW_SIZE
EXPORTING
WIDTH = '150'
HEIGHT = '150'.
CALL METHOD mr_popup_window->subscribe_to_button_event
EXPORTING
button = if_wd_window=>co_button_yes
action_name = 'ON_DELETE_POPUP_YES'
action_view = view_controller
is_default_button = abap_false.
CALL METHOD mr_popup_window->subscribe_to_button_event
EXPORTING
button = if_wd_window=>co_button_no
action_name = 'ON_DELETE_POPUP_NO'
action_view = view_controller
is_default_button = abap_false.
mr_popup_window->open( ).
regards
kk
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
94 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
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.