web dynpro里面的 POPUP_TO_CONFIRM

来源:互联网 发布:ubuntu 17.10 qt gtk 编辑:程序博客网 时间:2024/04/28 17:05

method popup_to_confirm .

  data: l_cmp_api          type ref to if_wd_component,

        l_window_manager   type ref to if_wd_window_manager,

        l_popup            type ref to if_wd_window,

        l_api              type ref to if_wd_view_controller.

 

 

  l_cmp_api        = wd_comp_controller->wd_get_api( ).

  l_window_manager = l_cmp_api->get_window_manager( ).

 

  l_popup = l_window_manager->create_popup_to_confirm(

                text            = text_ques

                button_kind     = popup_type

                message_type    = mess_type

                "if_wd_window=>co_msg_type_question

                window_title    = win_tit

                window_position = if_wd_window=>co_center )."#EC *

 

  l_api = wd_this->wd_get_api( ).

  l_popup->subscribe_to_button_event(

               button            = if_wd_window=>co_button_yes

               action_name       = 'YES'

               action_view       = l_api

               is_default_button = abap_false ).

  l_popup->subscribe_to_button_event(

               button            = if_wd_window=>co_button_no

               action_name       = 'NO'

               action_view       = l_api

               is_default_button = abap_true ).

*  l_popup->subscribe_to_button_event(

*               button            = if_wd_window=>co_button_cancel

*               action_name       = 'CANCEL'

*               action_view       = l_api

*               is_default_button = abap_false ).

*** Store the action type - this will be used in ONYES and ONNO events.

  wd_this->last_action = action.

  l_popup->open( ).

 

endmethod.