mirror of
https://github.com/abapGit/abapGit.git
synced 2025-05-01 12:20:51 +08:00
Merge pull request #984 from christianguenter2/Issue_793
Fix issue 793: Add support for BSP applications with pages of type so2_controller
This commit is contained in:
commit
8288295781
|
@ -28,7 +28,8 @@ CLASS lcl_object_wapa DEFINITION INHERITING FROM lcl_objects_super FINAL.
|
||||||
METHODS:
|
METHODS:
|
||||||
get_page_content
|
get_page_content
|
||||||
IMPORTING io_page TYPE REF TO cl_o2_api_pages
|
IMPORTING io_page TYPE REF TO cl_o2_api_pages
|
||||||
RETURNING VALUE(rv_content) TYPE xstring,
|
RETURNING VALUE(rv_content) TYPE xstring
|
||||||
|
RAISING zcx_abapgit_exception,
|
||||||
to_page_content
|
to_page_content
|
||||||
IMPORTING iv_content TYPE xstring
|
IMPORTING iv_content TYPE xstring
|
||||||
RETURNING VALUE(rt_content) TYPE o2pageline_table,
|
RETURNING VALUE(rt_content) TYPE o2pageline_table,
|
||||||
|
@ -235,6 +236,8 @@ CLASS lcl_object_wapa IMPLEMENTATION.
|
||||||
IMPORTING
|
IMPORTING
|
||||||
p_page = lo_page ).
|
p_page = lo_page ).
|
||||||
|
|
||||||
|
IF <ls_page>-attributes-pagetype <> so2_controller.
|
||||||
|
|
||||||
SPLIT <ls_page>-attributes-pagename AT '.' INTO lv_extra lv_ext.
|
SPLIT <ls_page>-attributes-pagename AT '.' INTO lv_extra lv_ext.
|
||||||
REPLACE ALL OCCURRENCES OF '_-' IN lv_extra WITH '/'.
|
REPLACE ALL OCCURRENCES OF '_-' IN lv_extra WITH '/'.
|
||||||
lv_content = mo_files->read_raw( iv_extra = lv_extra
|
lv_content = mo_files->read_raw( iv_extra = lv_extra
|
||||||
|
@ -245,6 +248,8 @@ CLASS lcl_object_wapa IMPLEMENTATION.
|
||||||
lo_page->set_parameters( <ls_page>-parameters ).
|
lo_page->set_parameters( <ls_page>-parameters ).
|
||||||
lo_page->set_type_source( <ls_page>-types ).
|
lo_page->set_type_source( <ls_page>-types ).
|
||||||
|
|
||||||
|
ENDIF.
|
||||||
|
|
||||||
lo_page->save( p_with_all_texts = abap_true ).
|
lo_page->save( p_with_all_texts = abap_true ).
|
||||||
|
|
||||||
ls_item-obj_type = 'WAPP'.
|
ls_item-obj_type = 'WAPP'.
|
||||||
|
@ -345,6 +350,12 @@ CLASS lcl_object_wapa IMPLEMENTATION.
|
||||||
IMPORTING
|
IMPORTING
|
||||||
p_page = lo_page ).
|
p_page = lo_page ).
|
||||||
|
|
||||||
|
lo_page->get_attrs(
|
||||||
|
IMPORTING
|
||||||
|
p_attrs = rs_page-attributes ).
|
||||||
|
|
||||||
|
IF rs_page-attributes-pagetype <> so2_controller.
|
||||||
|
|
||||||
lo_page->get_event_handlers(
|
lo_page->get_event_handlers(
|
||||||
IMPORTING
|
IMPORTING
|
||||||
p_ev_handler = rs_page-event_handlers
|
p_ev_handler = rs_page-event_handlers
|
||||||
|
@ -379,16 +390,15 @@ CLASS lcl_object_wapa IMPLEMENTATION.
|
||||||
iv_ext = lv_ext
|
iv_ext = lv_ext
|
||||||
iv_data = lv_content ).
|
iv_data = lv_content ).
|
||||||
|
|
||||||
lo_page->get_attrs(
|
CLEAR: rs_page-attributes-implclass.
|
||||||
IMPORTING
|
|
||||||
p_attrs = rs_page-attributes ).
|
ENDIF.
|
||||||
|
|
||||||
CLEAR: rs_page-attributes-author,
|
CLEAR: rs_page-attributes-author,
|
||||||
rs_page-attributes-createdon,
|
rs_page-attributes-createdon,
|
||||||
rs_page-attributes-changedby,
|
rs_page-attributes-changedby,
|
||||||
rs_page-attributes-changedon,
|
rs_page-attributes-changedon,
|
||||||
rs_page-attributes-changetime,
|
rs_page-attributes-changetime,
|
||||||
rs_page-attributes-implclass,
|
|
||||||
rs_page-attributes-gendate,
|
rs_page-attributes-gendate,
|
||||||
rs_page-attributes-gentime,
|
rs_page-attributes-gentime,
|
||||||
rs_page-attributes-devclass.
|
rs_page-attributes-devclass.
|
||||||
|
@ -413,7 +423,15 @@ CLASS lcl_object_wapa IMPLEMENTATION.
|
||||||
|
|
||||||
io_page->get_page(
|
io_page->get_page(
|
||||||
IMPORTING
|
IMPORTING
|
||||||
p_content = lt_content ).
|
p_content = lt_content
|
||||||
|
EXCEPTIONS
|
||||||
|
invalid_call = 1
|
||||||
|
page_deleted = 2
|
||||||
|
OTHERS = 3 ).
|
||||||
|
|
||||||
|
IF sy-subrc <> 0.
|
||||||
|
zcx_abapgit_exception=>raise( |WAPA - error from get_page_content| ).
|
||||||
|
ENDIF.
|
||||||
|
|
||||||
CONCATENATE LINES OF lt_content INTO lv_string SEPARATED BY zif_abapgit_definitions=>gc_newline RESPECTING BLANKS.
|
CONCATENATE LINES OF lt_content INTO lv_string SEPARATED BY zif_abapgit_definitions=>gc_newline RESPECTING BLANKS.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user