{"id":275,"date":"2013-09-17T15:03:35","date_gmt":"2013-09-17T19:03:35","guid":{"rendered":"http:\/\/www.prglab.com\/blog\/?p=275"},"modified":"2013-09-17T15:03:35","modified_gmt":"2013-09-17T19:03:35","slug":"web-dynpro-%e5%a6%82%e4%bd%95%e7%94%9f%e6%88%90%e5%bc%b9%e7%aa%97","status":"publish","type":"post","link":"https:\/\/www.prglab.com\/blog\/p\/275","title":{"rendered":"Web Dynpro \u5982\u4f55\u751f\u6210\u5f39\u7a97"},"content":{"rendered":"<p>1. \u5f39\u51fa\u7a97\u53e3\u4e3aWebdynpro\u7a97\u53e3<br \/>\n\u5728Webdynpro Component\u91cc\u5efa\u597d\u4e00\u4e2a\u7a97\u53e3\uff0c\u53d6\u540d W_POPUP<br \/>\n\u5728\u8981\u751f\u6210\u5f39\u7a97\u7684\u4e8b\u4ef6\u4e2d\u5199\u4ee5\u4e0b\u4ee3\u7801\uff1a<br \/>\n<code><br \/>\n  DATA lo_nd_error_message TYPE REF TO if_wd_context_node.<br \/>\n  DATA lo_el_error_message TYPE REF TO if_wd_context_element.<br \/>\n  DATA lo_window_manager TYPE REF TO if_wd_window_manager.<br \/>\n  DATA lo_api_component TYPE REF TO if_wd_component.<br \/>\n  DATA lo_window TYPE REF TO if_wd_window.<\/p>\n<p>  lo_api_component = wd_comp_controller->wd_get_api( ).<br \/>\n  lo_window_manager = lo_api_component->get_window_manager( ).<br \/>\n  lo_window = lo_window_manager->create_window(<br \/>\n      window_name = 'W_POPUP'<br \/>\n      title = 'POPUP WINDOW'<br \/>\n      message_display_mode = if_wd_window=>co_msg_display_mode_selected<br \/>\n      close_button = abap_true<br \/>\n      button_kind = if_wd_window=>co_buttons_close<br \/>\n      message_type = if_wd_window=>co_msg_type_none<br \/>\n      default_button = if_wd_window=>co_button_close<br \/>\n      ).<br \/>\n  lo_window->open( ).<br \/>\n<\/code><\/p>\n<p>2. \u5f39\u51fa\u7a97\u53e3\u4e3a\u5916\u90e8\u7a97\u53e3\uff0c\u5373\u94fe\u63a5\u5230\u5916\u90e8URL<br \/>\n \u5728\u8981\u751f\u6210\u5f39\u7a97\u7684\u4e8b\u4ef6\u4e2d\u5199\u4ee5\u4e0b\u4ee3\u7801\uff1a<br \/>\n<code><br \/>\n  data: window_manager type ref to if_wd_window_manager,<br \/>\n      api_component  type ref to if_wd_component,<br \/>\n      lo_window      type ref to if_wd_window.<\/p>\n<p>  api_component  = wd_comp_controller->wd_get_api( ).<br \/>\n  window_manager = api_component->get_window_manager( ).<\/p>\n<p>  CALL METHOD window_manager->create_external_window<br \/>\n    EXPORTING<br \/>\n      url            = lv_ext_url   \"\u8981\u94fe\u63a5\u5230\u7684URL\u5730\u5740<br \/>\n      title          = 'POP WINDOW'<br \/>\n      modal          = abap_true<br \/>\n      has_menubar    = abap_false<br \/>\n      is_resizable   = abap_true<br \/>\n      has_scrollbars = abap_false<br \/>\n      has_statusbar  = abap_false<br \/>\n      has_toolbar    = abap_false<br \/>\n      has_location   = abap_false<br \/>\n    RECEIVING<br \/>\n      window         = lo_window.<\/p>\n<p>  lo_window->open( ).<br \/>\n<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>1. \u5f39\u51fa\u7a97\u53e3\u4e3aWebdynpro\u7a97\u53e3 \u5728Webdynpro Component\u91cc\u5efa\u597d\u4e00\u4e2a\u7a97\u53e3\uff0c\u53d6\u540d W_POPUP \u5728\u8981\u751f\u6210\u5f39\u7a97\u7684\u4e8b\u4ef6\u4e2d\u5199\u4ee5\u4e0b\u4ee3\u7801\uff1a DATA lo_nd_error_message TYPE REF TO if_wd_context_node. DATA lo_el_error_message TYPE REF TO if_wd_context_element. DATA lo_window_manager TYPE REF TO if_wd_window_manager. DATA lo_api_component TYPE REF TO if_wd_component. DATA lo_window TYPE REF TO if_wd_window. 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 = &#8216;W_POPUP&#8217; title = &#8216;POPUP WINDOW&#8217; message_display_mode [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[12],"tags":[],"_links":{"self":[{"href":"https:\/\/www.prglab.com\/blog\/wp-json\/wp\/v2\/posts\/275"}],"collection":[{"href":"https:\/\/www.prglab.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.prglab.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.prglab.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.prglab.com\/blog\/wp-json\/wp\/v2\/comments?post=275"}],"version-history":[{"count":1,"href":"https:\/\/www.prglab.com\/blog\/wp-json\/wp\/v2\/posts\/275\/revisions"}],"predecessor-version":[{"id":276,"href":"https:\/\/www.prglab.com\/blog\/wp-json\/wp\/v2\/posts\/275\/revisions\/276"}],"wp:attachment":[{"href":"https:\/\/www.prglab.com\/blog\/wp-json\/wp\/v2\/media?parent=275"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.prglab.com\/blog\/wp-json\/wp\/v2\/categories?post=275"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.prglab.com\/blog\/wp-json\/wp\/v2\/tags?post=275"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}