on 03-02-2012 2:59 AM
Hello All,
I am developing a web dynpro component, in my web dynpro component I have two views. On the first view I have a button that calls the second view and for this I have written the following code:
lo_api_component = wd_comp_controller->wd_get_api( ).
lo_window_manager = lo_api_component->get_window_manager( ).
lo_window = lo_window_manager->create_window(
window_name = 'ZWD_SCREEN'
* title =
* close_in_any_case = abap_true
message_display_mode = if_wd_window=>co_msg_display_mode_selected
* close_button = abap_true
button_kind = if_wd_window=>CO_BUTTONS_CLOSE
message_type = if_wd_window=>co_msg_type_none
* default_button = if_wd_window=>CO_BUTTONS_CLOSE
).
lo_window->open( ).
the above code is working fine and it's launching the second view correctly. Now I wanted to put some logic when a user clicks on button CLOSE and for this I have written the below code:
CALL METHOD lo_window->subscribe_to_button_event
EXPORTING
button = if_wd_window=>CO_BUTTONS_CLOSE
* button_text =
* tooltip =
action_name = 'CLOSE'
action_view = l_api.
* is_default_button = ABAP_FALSE
I have created an action 'CLOSE' and put my logic in the method ONACTIONCLOSE, but I am getting the below dump "but when I add an action to the CLOSE button I am getting this dump "No Button 2 Is Defined for Popup ZHWD_SCREEN ""
Can you please let me know what am I doing wrong here?
Thanks.,
Rajat
I changed the code as below and it worked fine.
CALL METHOD lo_window->subscribe_to_button_event
EXPORTING
button = if_wd_window=>CO_BUTTON_CLOSE
button_text =
tooltip =
action_name = 'CLOSE'
action_view = l_api.
is_default_button = ABAP_FALSE
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.