diff --git a/src/00/z2ui5_cl_app_demo_00.clas.abap b/src/00/z2ui5_cl_app_demo_00.clas.abap index e6407b5c..af5b13d8 100644 --- a/src/00/z2ui5_cl_app_demo_00.clas.abap +++ b/src/00/z2ui5_cl_app_demo_00.clas.abap @@ -47,7 +47,7 @@ CLASS z2ui5_cl_app_demo_00 IMPLEMENTATION. )->get_parent( ). DATA(grid) = page->grid( 'L3 M6 S12' - )->content( 'l' ). + )->content( 'layout' ). grid->simple_form( title = 'HowTo - General' layout = 'ResponsiveGridLayout' )->content( 'form' )->button( text = 'Communication & Data Binding' press = client->_event( 'z2ui5_cl_app_demo_01' ) @@ -99,7 +99,7 @@ CLASS z2ui5_cl_app_demo_00 IMPLEMENTATION. ). DATA(form) = page->grid( 'L9 M12 S12' - )->content( 'l' + )->content( 'layout' )->simple_form( 'Demos I' )->vbox( ). @@ -170,7 +170,7 @@ CLASS z2ui5_cl_app_demo_00 IMPLEMENTATION. styleclass = 'sapUiTinyMargin' ). form = page->grid( 'L9 M12 S12' - )->content( 'l' + )->content( 'layout' )->simple_form( 'Demos II' )->vbox( ). diff --git a/src/00/z2ui5_cl_app_demo_02.clas.abap b/src/00/z2ui5_cl_app_demo_02.clas.abap index cca04720..b6cfc5cb 100644 --- a/src/00/z2ui5_cl_app_demo_02.clas.abap +++ b/src/00/z2ui5_cl_app_demo_02.clas.abap @@ -120,7 +120,7 @@ CLASS Z2UI5_CL_APP_DEMO_02 IMPLEMENTATION. )->get_parent( ). DATA(grid) = page->grid( 'L6 M12 S12' - )->content( 'l' ). + )->content( 'layout' ). grid->simple_form( 'Input' )->content( 'form' @@ -147,7 +147,7 @@ CLASS Z2UI5_CL_APP_DEMO_02 IMPLEMENTATION. DATA(form) = grid->get_parent( )->get_parent( )->grid( 'L12 M12 S12' - )->content( 'l' + )->content( 'layout' )->simple_form( 'Input with select options' )->content( 'form' ). diff --git a/src/00/z2ui5_cl_app_demo_04.clas.abap b/src/00/z2ui5_cl_app_demo_04.clas.abap index e13b11fc..0dec7b7c 100644 --- a/src/00/z2ui5_cl_app_demo_04.clas.abap +++ b/src/00/z2ui5_cl_app_demo_04.clas.abap @@ -89,7 +89,7 @@ CLASS Z2UI5_CL_APP_DEMO_04 IMPLEMENTATION. target = '_blank' )->get_parent( ). - page->grid( 'L6 M12 S12' )->content( 'l' + page->grid( 'L6 M12 S12' )->content( 'layout' )->simple_form( 'Controller' )->content( 'form' )->label( 'Roundtrip' )->button( @@ -117,7 +117,7 @@ CLASS Z2UI5_CL_APP_DEMO_04 IMPLEMENTATION. shownavbutton = abap_true ). - page->grid( 'L12 M12 S12' )->content( 'l' + page->grid( 'L12 M12 S12' )->content( 'layout' )->simple_form( 'View Second' )->content( 'form' )->label( 'Change View' )->button( diff --git a/src/00/z2ui5_cl_app_demo_05.clas.abap b/src/00/z2ui5_cl_app_demo_05.clas.abap index a5eb4379..ddf207df 100644 --- a/src/00/z2ui5_cl_app_demo_05.clas.abap +++ b/src/00/z2ui5_cl_app_demo_05.clas.abap @@ -136,7 +136,7 @@ CLASS Z2UI5_CL_APP_DEMO_05 IMPLEMENTATION. number = '3.5M' unit = 'EUR' ). - DATA(grid) = page->grid( 'L12 M12 S12' )->content( 'l' ). + DATA(grid) = page->grid( 'L12 M12 S12' )->content( 'layout' ). grid->simple_form( 'More Controls' )->content( 'form' )->label( 'ProgressIndicator' diff --git a/src/00/z2ui5_cl_app_demo_07.clas.abap b/src/00/z2ui5_cl_app_demo_07.clas.abap index ab174afd..9fefea61 100644 --- a/src/00/z2ui5_cl_app_demo_07.clas.abap +++ b/src/00/z2ui5_cl_app_demo_07.clas.abap @@ -7,8 +7,6 @@ CLASS z2ui5_cl_app_demo_07 DEFINITION PUBLIC. DATA mv_path TYPE string. DATA mv_value TYPE string. - " DATA mv_popup_view TYPE string. - " DATA check_initialized TYPE abap_bool. TYPES: BEGIN OF ty_file, selkz TYPE abap_bool, @@ -22,7 +20,6 @@ CLASS z2ui5_cl_app_demo_07 DEFINITION PUBLIC. DATA mt_file TYPE STANDARD TABLE OF ty_file WITH EMPTY KEY. DATA ms_file_edit TYPE ty_file. DATA ms_file_prev TYPE ty_file. - " DATA mv_set_prev_view TYPE abap_bool. PROTECTED SECTION. @@ -153,13 +150,13 @@ CLASS z2ui5_cl_app_demo_07 IMPLEMENTATION. METHOD ui5_render_view_init. - DATA(lo_view) = z2ui5_cl_xml_view_helper=>factory( ns = VALUE #( - ( `xmlns:mvc="sap.ui.core.mvc"` ) - ( `xmlns:m="sap.m"` ) - ( `xmlns:z2ui5="z2ui5"` ) - ( `xmlns:core="sap.ui.core"` ) - ( `xmlns="http://www.w3.org/1999/xhtml"` ) - ) ). + DATA(lo_view) = z2ui5_cl_xml_view_helper=>factory( VALUE #( + ( n = `xmlns:mvc` v = `sap.ui.core.mvc` ) + ( n = `xmlns:m` v = `sap.m` ) + ( n = `xmlns:z2ui5` v = `z2ui5` ) + ( n = `xmlns:core` v = `sap.ui.core` ) + ( n = `xmlns` v = `http://www.w3.org/1999/xhtml` ) + ) ). DATA(page) = lo_view->_generic( name = 'Shell' ns = 'm' )->page( ns = 'm' @@ -243,7 +240,7 @@ CLASS z2ui5_cl_app_demo_07 IMPLEMENTATION. METHOD ui5_render_popup_descr. - DATA(lo_popup) = z2ui5_cl_xml_view_helper=>factory( + DATA(lo_popup) = z2ui5_cl_xml_view_helper=>factory_popup( )->dialog( title = 'Edit Description' icon = 'sap-icon://edit' @@ -270,7 +267,7 @@ CLASS z2ui5_cl_app_demo_07 IMPLEMENTATION. METHOD ui5_render_popup_data. - DATA(lo_popup) = z2ui5_cl_xml_view_helper=>factory( + DATA(lo_popup) = z2ui5_cl_xml_view_helper=>factory_popup( )->dialog( stretch = abap_true title = 'Data:' diff --git a/src/00/z2ui5_cl_app_demo_08.clas.abap b/src/00/z2ui5_cl_app_demo_08.clas.abap index d151cbc0..58bafa5d 100644 --- a/src/00/z2ui5_cl_app_demo_08.clas.abap +++ b/src/00/z2ui5_cl_app_demo_08.clas.abap @@ -68,7 +68,7 @@ CLASS Z2UI5_CL_APP_DEMO_08 IMPLEMENTATION. ENDIF. page->grid( 'L6 M12 S12' - )->content( 'l' + )->content( 'layout' )->simple_form( 'Message Box' )->content( 'form' )->button( text = 'information' @@ -84,7 +84,7 @@ CLASS Z2UI5_CL_APP_DEMO_08 IMPLEMENTATION. press = client->_event( 'BUTTON_MESSAGE_BOX_WARNING' ) ). page->grid( 'L6 M12 S12' - )->content( 'l' + )->content( 'layout' )->simple_form( 'Message Strip' )->content( 'form' )->button( text = 'success' @@ -97,7 +97,7 @@ CLASS Z2UI5_CL_APP_DEMO_08 IMPLEMENTATION. press = client->_event( 'BUTTON_MESSAGE_STRIP_INFO' ) ). page->grid( 'L6 M12 S12' - )->content( 'l' + )->content( 'layout' )->simple_form( 'Display' )->content( 'form' )->button( text = 'Message Toast' diff --git a/src/00/z2ui5_cl_app_demo_09.clas.abap b/src/00/z2ui5_cl_app_demo_09.clas.abap index b7f08bde..689553a8 100644 --- a/src/00/z2ui5_cl_app_demo_09.clas.abap +++ b/src/00/z2ui5_cl_app_demo_09.clas.abap @@ -222,7 +222,7 @@ CLASS Z2UI5_CL_APP_DEMO_09 IMPLEMENTATION. )->get_parent( ). DATA(form) = page->grid( 'L7 M7 S7' - )->content( 'l' + )->content( 'layout' )->simple_form( 'Input with Value Help' )->content( 'form' ). @@ -282,7 +282,7 @@ CLASS Z2UI5_CL_APP_DEMO_09 IMPLEMENTATION. WHEN 'POPUP_TABLE_F4'. - popup = z2ui5_cl_xml_view_helper=>factory( + popup = z2ui5_cl_xml_view_helper=>factory_popup( )->dialog( 'abap2UI5 - F4 Value Help' )->table( mode = 'SingleSelectLeft' @@ -309,7 +309,7 @@ CLASS Z2UI5_CL_APP_DEMO_09 IMPLEMENTATION. WHEN 'POPUP_TABLE_F4_CUSTOM'. - popup = z2ui5_cl_xml_view_helper=>factory( + popup = z2ui5_cl_xml_view_helper=>factory_popup( )->dialog( 'abap2UI5 - F4 Value Help' ). popup->simple_form( diff --git a/src/00/z2ui5_cl_app_demo_10.clas.abap b/src/00/z2ui5_cl_app_demo_10.clas.abap index 1c67c2d3..217cafbd 100644 --- a/src/00/z2ui5_cl_app_demo_10.clas.abap +++ b/src/00/z2ui5_cl_app_demo_10.clas.abap @@ -50,7 +50,7 @@ CLASS Z2UI5_CL_APP_DEMO_10 IMPLEMENTATION. )->text( 'text' )->link( text = 'link' href = 'https://twitter.com/OblomovDev' ). - DATA(grid) = page->grid( 'L4 M4 S4' )->content( 'l' ). + DATA(grid) = page->grid( 'L4 M4 S4' )->content( 'layout' ). grid->simple_form( 'Grid width 33%' )->content( 'form' )->button( text = 'button' @@ -67,7 +67,7 @@ CLASS Z2UI5_CL_APP_DEMO_10 IMPLEMENTATION. )->text( 'text' )->link( text = 'link' href = 'https://twitter.com/OblomovDev' ). - grid = page->grid( 'L12 M12 S12' )->content( 'l' ). + grid = page->grid( 'L12 M12 S12' )->content( 'layout' ). grid->simple_form( 'grid width 100%' )->content( 'form' )->button( text = 'button' diff --git a/src/00/z2ui5_cl_app_demo_12.clas.abap b/src/00/z2ui5_cl_app_demo_12.clas.abap index 7b7587f3..e89f120e 100644 --- a/src/00/z2ui5_cl_app_demo_12.clas.abap +++ b/src/00/z2ui5_cl_app_demo_12.clas.abap @@ -93,7 +93,7 @@ CLASS Z2UI5_CL_APP_DEMO_12 IMPLEMENTATION. href = z2ui5_cl_xml_view_helper=>hlp_get_source_code_url( app = me get = client->get( ) ) )->get_parent( ). - DATA(grid) = page->grid( 'L7 M12 S12' )->content( 'l' + DATA(grid) = page->grid( 'L7 M12 S12' )->content( 'layout' )->simple_form( 'Popup in same App' )->content( 'form' )->label( 'Demo' )->button( @@ -125,7 +125,7 @@ CLASS Z2UI5_CL_APP_DEMO_12 IMPLEMENTATION. ENDCASE. - DATA(lo_popup) = z2ui5_cl_xml_view_helper=>factory( ). + DATA(lo_popup) = z2ui5_cl_xml_view_helper=>factory_popup( ). CASE mv_popup_view. diff --git a/src/00/z2ui5_cl_app_demo_13.clas.abap b/src/00/z2ui5_cl_app_demo_13.clas.abap index 300850b9..8a14c4a8 100644 --- a/src/00/z2ui5_cl_app_demo_13.clas.abap +++ b/src/00/z2ui5_cl_app_demo_13.clas.abap @@ -186,14 +186,14 @@ CLASS Z2UI5_CL_APP_DEMO_13 IMPLEMENTATION. press = client->_event( 'BTN_EXPORT' ) )->get_parent( )->get_parent( ). - DATA(grid) = page->grid( 'L7 M7 S7' )->content( 'l' ). + DATA(grid) = page->grid( 'L7 M7 S7' )->content( 'layout' ). grid->simple_form( '2. Edit Data' )->content( 'form' )->label( 'Table' )->input( 'SPFLI' ). - grid = page->grid( 'L12 M12 S12' )->content( 'l' ). + grid = page->grid( 'L12 M12 S12' )->content( 'layout' ). DATA(cont) = grid->simple_form( )->content( 'form' ). @@ -274,7 +274,7 @@ CLASS Z2UI5_CL_APP_DEMO_13 IMPLEMENTATION. enabled = abap_false )->get_parent( )->get_parent( ). - DATA(grid) = page->grid( 'L7 M7 S7' )->content( 'l' ). + DATA(grid) = page->grid( 'L7 M7 S7' )->content( 'layout' ). grid->simple_form( '3. Export Data' )->content( 'form' @@ -287,7 +287,7 @@ CLASS Z2UI5_CL_APP_DEMO_13 IMPLEMENTATION. )->segmented_button_item( key = 'csv' text = 'csv' )->segmented_button_item( key = 'xml' text = 'xml' ). - grid = page->grid( 'L12 M12 S12' )->content( 'l' ). + grid = page->grid( 'L12 M12 S12' )->content( 'layout' ). grid->scroll_container( '75%' )->code_editor( @@ -338,7 +338,7 @@ CLASS Z2UI5_CL_APP_DEMO_13 IMPLEMENTATION. press = client->_event( 'BTN_EXPORT' ) )->get_parent( )->get_parent( ). - DATA(grid) = page->grid( 'L7 M12 S12' )->content( 'l' ). + DATA(grid) = page->grid( 'L7 M12 S12' )->content( 'layout' ). grid->simple_form( '1. Import Data' )->content( 'form' @@ -351,7 +351,7 @@ CLASS Z2UI5_CL_APP_DEMO_13 IMPLEMENTATION. )->segmented_button_item( key = 'csv' text = 'csv' )->segmented_button_item( key = 'xml' text = 'xml' ). - grid = page->grid( 'L12 M12 S12' )->content( 'l' ). + grid = page->grid( 'L12 M12 S12' )->content( 'layout' ). grid->scroll_container( '75%' )->code_editor( diff --git a/src/00/z2ui5_cl_app_demo_14.clas.abap b/src/00/z2ui5_cl_app_demo_14.clas.abap index ed5985b7..4c5a8984 100644 --- a/src/00/z2ui5_cl_app_demo_14.clas.abap +++ b/src/00/z2ui5_cl_app_demo_14.clas.abap @@ -60,7 +60,7 @@ CLASS Z2UI5_CL_APP_DEMO_14 IMPLEMENTATION. )->link( text = 'Source_Code' target = '_blank' href = z2ui5_cl_xml_view_helper=>hlp_get_source_code_url( app = me get = client->get( ) ) )->get_parent( ). - DATA(grid) = page->grid( 'L7 M12 S12' )->content( 'l' ). + DATA(grid) = page->grid( 'L7 M12 S12' )->content( 'layout' ). grid->simple_form( title = 'File' editable = abap_true )->content( 'form' )->label( 'path' @@ -77,7 +77,7 @@ CLASS Z2UI5_CL_APP_DEMO_14 IMPLEMENTATION. press = client->_event( 'DB_LOAD' ) icon = 'sap-icon://download-from-cloud' ). - grid = page->grid( 'L12 M12 S12' )->content( 'l' ). + grid = page->grid( 'L12 M12 S12' )->content( 'layout' ). grid->simple_form( 'Editor' )->content( 'form' )->scroll_container( '75%' diff --git a/src/00/z2ui5_cl_app_demo_16.clas.abap b/src/00/z2ui5_cl_app_demo_16.clas.abap index 4bce4687..3ab63681 100644 --- a/src/00/z2ui5_cl_app_demo_16.clas.abap +++ b/src/00/z2ui5_cl_app_demo_16.clas.abap @@ -100,7 +100,7 @@ CLASS Z2UI5_CL_APP_DEMO_16 IMPLEMENTATION. bar->interact_bar_chart_bar( label = 'Product 3' value = '70' displayedvalue = '70%' ). bar = grid->vertical_layout( - )->layout_data( 'l' + )->layout_data( 'layout' )->grid_data( 'XL12 L12 M12 S12' )->get_parent( )->text( @@ -249,7 +249,7 @@ CLASS Z2UI5_CL_APP_DEMO_16 IMPLEMENTATION. point->interact_line_chart_point( label = 'Oct' value = '0.9' displayedvalue = '9.9%' ). point = grid->vertical_layout( - )->layout_data( ns = 'l' + )->layout_data( ns = 'layout' )->grid_data( 'XL12 L12 M12 S12' )->get_parent( )->text( diff --git a/src/00/z2ui5_cl_app_demo_17.clas.abap b/src/00/z2ui5_cl_app_demo_17.clas.abap index 83d4949c..4f2e1498 100644 --- a/src/00/z2ui5_cl_app_demo_17.clas.abap +++ b/src/00/z2ui5_cl_app_demo_17.clas.abap @@ -88,7 +88,7 @@ CLASS Z2UI5_CL_APP_DEMO_17 IMPLEMENTATION. DATA(header_content) = page->header_Content( ns = 'uxap' ). header_content->flex_box( wrap = 'Wrap' - )->avatar( src = lcl_help=>get_avatar( ) class = 'sapUiSmallMarginEnd' displaySize = 'L' + )->avatar( src = lcl_help=>get_avatar( ) class = 'sapUiSmallMarginEnd' displaySize = 'layout' )->vertical_layout( class = 'sapUiSmallMarginBeginEnd' )->link( text = '+33 6 4512 5158' )->link( text = 'email@email.com' @@ -103,7 +103,7 @@ CLASS Z2UI5_CL_APP_DEMO_17 IMPLEMENTATION. )->label( 'Achived goals' )->progress_indicator( percentvalue = '30%' displayvalue = '30%' )->get_parent( )->get_parent( - " )->avatar( src = lcl_help=>get_avatar( ) class = 'sapUiSmallMarginEnd' displaySize = 'L' + " )->avatar( src = lcl_help=>get_avatar( ) class = 'sapUiSmallMarginEnd' displaySize = 'layout' )->vertical_layout( class = 'sapUiSmallMarginBeginEnd' )->label( text = 'San Jose, USA' )->get_parent( diff --git a/src/00/z2ui5_cl_app_demo_20.clas.abap b/src/00/z2ui5_cl_app_demo_20.clas.abap index ba4a1be0..b4526dc1 100644 --- a/src/00/z2ui5_cl_app_demo_20.clas.abap +++ b/src/00/z2ui5_cl_app_demo_20.clas.abap @@ -61,9 +61,8 @@ CLASS Z2UI5_CL_APP_DEMO_20 IMPLEMENTATION. ENDCASE. client->set_next( VALUE #( - " event = mv_next_event check_set_prev_view = mv_check_show_previous_view - xml_popup = z2ui5_cl_xml_view_helper=>factory( + xml_popup = z2ui5_cl_xml_view_helper=>factory_popup( )->dialog( 'abap2UI5 - Popup to decide' )->vbox( )->text( mv_text )->get_parent( diff --git a/src/00/z2ui5_cl_app_demo_21.clas.abap b/src/00/z2ui5_cl_app_demo_21.clas.abap index 39465596..b77a8e31 100644 --- a/src/00/z2ui5_cl_app_demo_21.clas.abap +++ b/src/00/z2ui5_cl_app_demo_21.clas.abap @@ -82,7 +82,7 @@ CLASS Z2UI5_CL_APP_DEMO_21 IMPLEMENTATION. text = 'Source_Code' target = '_blank' href = z2ui5_cl_xml_view_helper=>hlp_get_source_code_url( app = me get = client->get( ) ) )->get_parent( ). - DATA(grid) = page->grid( 'L8 M12 S12' )->content( 'l' ). + DATA(grid) = page->grid( 'L8 M12 S12' )->content( 'layout' ). grid->simple_form( 'Decide' )->content( 'form' )->label( '01' @@ -122,7 +122,7 @@ CLASS Z2UI5_CL_APP_DEMO_21 IMPLEMENTATION. METHOD view_popup_decide. - DATA(popup) = z2ui5_cl_xml_view_helper=>factory( + DATA(popup) = z2ui5_cl_xml_view_helper=>factory_popup( )->dialog( title = 'Title' icon = 'sap-icon://question-mark' @@ -147,7 +147,7 @@ CLASS Z2UI5_CL_APP_DEMO_21 IMPLEMENTATION. METHOD view_popup_input. - DATA(popup) = z2ui5_cl_xml_view_helper=>factory( + DATA(popup) = z2ui5_cl_xml_view_helper=>factory_popup( )->dialog( contentheight = '500px' contentwidth = '500px' @@ -181,7 +181,7 @@ CLASS Z2UI5_CL_APP_DEMO_21 IMPLEMENTATION. METHOD view_popup_table. - DATA(popup) = z2ui5_cl_xml_view_helper=>factory( + DATA(popup) = z2ui5_cl_xml_view_helper=>factory_popup( )->dialog( 'abap2UI5 - Popup to select entry' )->table( mode = 'SingleSelectLeft' @@ -213,7 +213,7 @@ CLASS Z2UI5_CL_APP_DEMO_21 IMPLEMENTATION. METHOD view_popup_textarea. - DATA(popup) = z2ui5_cl_xml_view_helper=>factory( + DATA(popup) = z2ui5_cl_xml_view_helper=>factory_popup( )->dialog( stretch = mv_stretch_active title = 'Title' @@ -241,7 +241,7 @@ CLASS Z2UI5_CL_APP_DEMO_21 IMPLEMENTATION. METHOD view_popup_textarea_size. - DATA(popup) = z2ui5_cl_xml_view_helper=>factory( + DATA(popup) = z2ui5_cl_xml_view_helper=>factory_popup( )->dialog( contentheight = '100px' contentwidth = '1200px' diff --git a/src/00/z2ui5_cl_app_demo_24.clas.abap b/src/00/z2ui5_cl_app_demo_24.clas.abap index 38a2a954..f57f7f6a 100644 --- a/src/00/z2ui5_cl_app_demo_24.clas.abap +++ b/src/00/z2ui5_cl_app_demo_24.clas.abap @@ -60,7 +60,7 @@ CLASS z2ui5_cl_app_demo_24 IMPLEMENTATION. )->link( text = 'Source_Code' target = '_blank' href = z2ui5_cl_xml_view_helper=>hlp_get_source_code_url( app = me get = client->get( ) ) )->get_parent( - )->grid( 'L6 M12 S12' )->content( 'l' + )->grid( 'L6 M12 S12' )->content( 'layout' )->simple_form( 'Controller' )->content( 'form' diff --git a/src/00/z2ui5_cl_app_demo_25.clas.abap b/src/00/z2ui5_cl_app_demo_25.clas.abap index 6914793b..f427e3ca 100644 --- a/src/00/z2ui5_cl_app_demo_25.clas.abap +++ b/src/00/z2ui5_cl_app_demo_25.clas.abap @@ -8,7 +8,6 @@ CLASS z2ui5_cl_app_demo_25 DEFINITION PUBLIC. DATA mv_input_previous TYPE string. DATA mv_input_previous_set TYPE string. DATA mv_show_view TYPE string. - " data mv_next_event type string. DATA mv_event_backend TYPE string. PROTECTED SECTION. @@ -74,7 +73,7 @@ CLASS z2ui5_cl_app_demo_25 IMPLEMENTATION. )->link( text = 'Source_Code' target = '_blank' href = z2ui5_cl_xml_view_helper=>hlp_get_source_code_url( app = me get = client->get( ) ) )->get_parent( ). - page->grid( 'L6 M12 S12' )->content( 'l' + page->grid( 'L6 M12 S12' )->content( 'layout' )->simple_form( 'View: FIRST' )->content( 'form' @@ -100,7 +99,7 @@ CLASS z2ui5_cl_app_demo_25 IMPLEMENTATION. )->link( text = 'Source_Code' href = z2ui5_cl_xml_view_helper=>hlp_get_source_code_url( app = me get = client->get( ) ) )->get_parent( ). - page->grid( 'L6 M12 S12' )->content( 'l' + page->grid( 'L6 M12 S12' )->content( 'layout' )->simple_form( 'View: SECOND' )->content( 'form' )->label( 'Demo' )->button( text = 'leave to previous app' press = client->_event( 'BACK' ) diff --git a/src/00/z2ui5_cl_app_demo_26.clas.abap b/src/00/z2ui5_cl_app_demo_26.clas.abap index a438a5c5..f4a385a4 100644 --- a/src/00/z2ui5_cl_app_demo_26.clas.abap +++ b/src/00/z2ui5_cl_app_demo_26.clas.abap @@ -162,7 +162,7 @@ CLASS Z2UI5_CL_APP_DEMO_26 IMPLEMENTATION. WHEN 'POPOVER'. - app-s_next-xml_popup = z2ui5_cl_xml_view_helper=>factory( )->popover( + app-s_next-xml_popup = z2ui5_cl_xml_view_helper=>factory_popup( )->popover( title = 'Popover Title' placement = mv_placement )->footer( )->overflow_toolbar( diff --git a/src/00/z2ui5_cl_app_demo_34.clas.abap b/src/00/z2ui5_cl_app_demo_34.clas.abap index f02bdfa6..5a97ff11 100644 --- a/src/00/z2ui5_cl_app_demo_34.clas.abap +++ b/src/00/z2ui5_cl_app_demo_34.clas.abap @@ -4,32 +4,7 @@ CLASS z2ui5_cl_app_demo_34 DEFINITION PUBLIC. INTERFACES z2ui5_if_app. - TYPES: - BEGIN OF ty_row, - selkz TYPE abap_bool, - title TYPE string, - value TYPE string, - descr TYPE string, - icon TYPE string, - info TYPE string, - checkbox TYPE abap_bool, - END OF ty_row. - - DATA t_tab TYPE STANDARD TABLE OF ty_row WITH EMPTY KEY. - - DATA mv_textarea TYPE string. - DATA mv_stretch_active TYPE abap_bool. - - DATA: - BEGIN OF ms_popup_input, - value1 TYPE string, - value2 TYPE string, - check_is_active TYPE abap_bool, - combo_key TYPE string, - END OF ms_popup_input. - DATA t_bapiret TYPE bapirettab. - DATA check_initialized TYPE abap_bool. DATA mv_popup_name TYPE string. DATA mv_main_xml TYPE string. @@ -42,7 +17,6 @@ CLASS z2ui5_cl_app_demo_34 DEFINITION PUBLIC. IMPORTING client TYPE REF TO z2ui5_if_client. - PROTECTED SECTION. PRIVATE SECTION. ENDCLASS. @@ -66,7 +40,7 @@ CLASS Z2UI5_CL_APP_DEMO_34 IMPLEMENTATION. text = 'Source_Code' target = '_blank' href = z2ui5_cl_xml_view_helper=>hlp_get_source_code_url( app = me get = client->get( ) ) )->get_parent( ). - DATA(grid) = page->grid( 'L8 M12 S12' )->content( 'l' ). + DATA(grid) = page->grid( 'L8 M12 S12' )->content( 'layout' ). grid->simple_form( 'Tables' )->content( 'form' )->label( '01' @@ -82,7 +56,7 @@ CLASS Z2UI5_CL_APP_DEMO_34 IMPLEMENTATION. METHOD view_popup_bal. - DATA(popup) = z2ui5_cl_xml_view_helper=>factory( + DATA(popup) = z2ui5_cl_xml_view_helper=>factory_popup( )->dialog( 'abap2ui5 - Popup Message Log' )->table( client->_bind( t_bapiret ) )->columns( diff --git a/src/00/z2ui5_cl_xml_view_helper.clas.abap b/src/00/z2ui5_cl_xml_view_helper.clas.abap index e2da3aaa..bb29d3a1 100644 --- a/src/00/z2ui5_cl_xml_view_helper.clas.abap +++ b/src/00/z2ui5_cl_xml_view_helper.clas.abap @@ -1,7 +1,7 @@ CLASS z2ui5_cl_xml_view_helper DEFINITION PUBLIC FINAL - CREATE PUBLIC . + CREATE PROTECTED. PUBLIC SECTION. @@ -23,7 +23,13 @@ CLASS z2ui5_cl_xml_view_helper DEFINITION CLASS-METHODS factory IMPORTING - ns TYPE string_table OPTIONAL + t_ns TYPE ty_t_name_value OPTIONAL + RETURNING + VALUE(result) TYPE REF TO z2ui5_cl_xml_view_helper. + + CLASS-METHODS factory_popup + IMPORTING + t_ns TYPE ty_t_name_value OPTIONAL RETURNING VALUE(result) TYPE REF TO z2ui5_cl_xml_view_helper. @@ -34,9 +40,7 @@ CLASS z2ui5_cl_xml_view_helper DEFINITION RETURNING VALUE(result) TYPE string. - METHODS constructor - IMPORTING - ns TYPE string_table OPTIONAL. + METHODS constructor. METHODS horizontal_layout IMPORTING @@ -851,15 +855,7 @@ CLASS z2ui5_cl_xml_view_helper DEFINITION RETURNING VALUE(result) TYPE string. - PROTECTED SECTION. - - METHODS xml_get_begin - RETURNING - VALUE(result) TYPE string. - - DATA mt_ns TYPE string_table. - PRIVATE SECTION. ENDCLASS. @@ -868,52 +864,25 @@ ENDCLASS. CLASS z2ui5_cl_xml_view_helper IMPLEMENTATION. - - METHOD constructor. - - IF ns IS INITIAL. - - mt_ns = VALUE string_table( - ( `xmlns="sap.m"` ) - ( `xmlns:z2ui5="z2ui5"` ) - ( `xmlns:core="sap.ui.core"` ) - ( `xmlns:mvc="sap.ui.core.mvc"` ) - ( `xmlns:l="sap.ui.layout"` ) - ( `xmlns:f="sap.f"` ) - ( `xmlns:form="sap.ui.layout.form"` ) - ( `xmlns:editor="sap.ui.codeeditor"` ) - ( `xmlns:mchart="sap.suite.ui.microchart"` ) - ( `xmlns:webc="sap.ui.webc.main"` ) - ( `xmlns:uxap="sap.uxap"` ) - ( `xmlns:sap="sap"` ) - ( `xmlns:text="sap.ui.richtexteditor"` ) - ( `xmlns:html="http://www.w3.org/1999/xhtml"` ) - ). - - ELSE. - mt_ns = ns. - ENDIF. - - ENDMETHOD. - - METHOD factory. - DATA(lo_tree) = NEW z2ui5_cl_xml_view_helper( ns = ns ). - lo_tree->m_root = lo_tree. - lo_tree->m_parent = lo_tree. - result = lo_tree. + result = NEW #( ). - ENDMETHOD. + IF t_ns IS NOT INITIAL. + result->mt_prop = t_ns. + ENDIF. + result->mt_prop = VALUE #( BASE result->mt_prop + ( n = 'displayBlock' v = 'true' ) + ( n = 'height' v = '100%' ) + ( n = 'controllerName' v = 'z2ui5_controller' ) + ). - METHOD xml_get_begin. + result->m_name = `View`. + result->m_ns = `mvc`. - result = `* && ` `. - ENDLOOP. - result = result && `>`. + result->m_root = result. + result->m_parent = result. ENDMETHOD. @@ -1277,7 +1246,7 @@ CLASS z2ui5_cl_xml_view_helper IMPLEMENTATION. result = _generic( name = `Grid` - ns = `l` + ns = `layout` t_prop = VALUE #( ( n = `defaultSpan` v = default_span ) ( n = `class` v = class ) @@ -1291,7 +1260,7 @@ CLASS z2ui5_cl_xml_view_helper IMPLEMENTATION. result = me. _generic( name = `GridData` - ns = `l` + ns = `layout` t_prop = VALUE #( ( n = `span` v = span ) ) ). @@ -1352,7 +1321,7 @@ CLASS z2ui5_cl_xml_view_helper IMPLEMENTATION. result = _generic( name = `HorizontalLayout` - ns = `l` + ns = `layout` t_prop = VALUE #( ( n = `class` v = class ) ( n = `width` v = width ) @@ -2154,7 +2123,7 @@ CLASS z2ui5_cl_xml_view_helper IMPLEMENTATION. result = _generic( name = `VerticalLayout` - ns = `l` + ns = `layout` t_prop = VALUE #( ( n = `class` v = class ) ( n = `width` v = width ) @@ -2165,28 +2134,7 @@ CLASS z2ui5_cl_xml_view_helper IMPLEMENTATION. METHOD xml_get. - "case - root - IF me = m_root. - - IF t_child IS INITIAL. - RETURN. - ENDIF. - - result = xml_get_begin( ). - - LOOP AT t_child INTO DATA(lr_child). - result = result && CAST z2ui5_cl_xml_view_helper( lr_child )->xml_get( ). - ENDLOOP. - - result = result && ``. - RETURN. - ENDIF. - - "case - normal CASE m_name. - WHEN `ZZHTML`. - result = mt_prop[ n = `VALUE` ]-v. - RETURN. WHEN `ZZPLAIN`. result = mt_prop[ n = `VALUE` ]-v. RETURN. @@ -2205,7 +2153,7 @@ CLASS z2ui5_cl_xml_view_helper IMPLEMENTATION. result = |{ result }>|. - LOOP AT t_child INTO lr_child. + LOOP AT t_child INTO DATA(lr_child). result = result && CAST z2ui5_cl_xml_view_helper( lr_child )->xml_get( ). ENDLOOP. @@ -2343,4 +2291,47 @@ CLASS z2ui5_cl_xml_view_helper IMPLEMENTATION. ENDMETHOD. + METHOD factory_popup. + + result = NEW #( ). + + IF t_ns IS NOT INITIAL. + result->mt_prop = t_ns. + ENDIF. + + " result->mt_prop = VALUE #( BASE result->mt_prop + " ( n = 'displayBlock' v = 'true' ) + " ( n = 'height' v = '100%' ) + " ( n = 'controllerName' v = 'z2ui5_controller' ) + " ). + + result->m_name = `FragmentDefinition`. + result->m_ns = `core`. + + result->m_root = result. + result->m_parent = result. + + ENDMETHOD. + + METHOD constructor. + + mt_prop = VALUE #( + ( n = `xmlns` v = `sap.m` ) + ( n = `xmlns:z2ui5` v = `z2ui5` ) + ( n = `xmlns:core` v = `sap.ui.core` ) + ( n = `xmlns:mvc` v = `sap.ui.core.mvc` ) + ( n = `xmlns:layout` v = `sap.ui.layout` ) + ( n = `xmlns:f` v = `sap.f` ) + ( n = `xmlns:form` v = `sap.ui.layout.form` ) + ( n = `xmlns:editor` v = `sap.ui.codeeditor` ) + ( n = `xmlns:mchart` v = `sap.suite.ui.microchart` ) + ( n = `xmlns:webc` v = `sap.ui.webc.main` ) + ( n = `xmlns:uxap` v = `sap.uxap` ) + ( n = `xmlns:sap` v = `sap` ) + ( n = `xmlns:text` v = `sap.ui.richtextedito` ) + ( n = `xmlns:html` v = `http://www.w3.org/1999/xhtml` ) + ). + + ENDMETHOD. + ENDCLASS. diff --git a/src/z2ui5_cl_http_handler.clas.abap b/src/z2ui5_cl_http_handler.clas.abap index 993bd63e..02053daa 100644 --- a/src/z2ui5_cl_http_handler.clas.abap +++ b/src/z2ui5_cl_http_handler.clas.abap @@ -17,6 +17,7 @@ CLASS z2ui5_cl_http_handler DEFINITION library_path TYPE clike DEFAULT `https://sdk.openui5.org/resources/sap-ui-core.js` theme TYPE clike DEFAULT `sap_horizon` title TYPE clike DEFAULT `abap2UI5` + rtl TYPE abap_bool OPTIONAL check_logging TYPE abap_bool DEFAULT abap_false RETURNING VALUE(r_result) TYPE string ##NEEDED. @@ -86,8 +87,12 @@ CLASS z2ui5_cl_http_handler IMPLEMENTATION. ` }` && |\n| && ` ` && ` ` && |\n| && `` && |\n| && diff --git a/src/z2ui5_cl_http_handler.clas.locals_imp.abap b/src/z2ui5_cl_http_handler.clas.locals_imp.abap index 81d3a390..9cce7256 100644 --- a/src/z2ui5_cl_http_handler.clas.locals_imp.abap +++ b/src/z2ui5_cl_http_handler.clas.locals_imp.abap @@ -995,11 +995,6 @@ CLASS z2ui5_lcl_system_runtime DEFINITION. RETURNING VALUE(rv_xml) TYPE string. - METHODS request_end_popup - RETURNING - VALUE(rv_xml) TYPE string. - - PROTECTED SECTION. PRIVATE SECTION. ENDCLASS. @@ -1431,7 +1426,7 @@ CLASS z2ui5_lcl_system_runtime IMPLEMENTATION. ENDIF. IF ms_next-s_set-xml_popup IS NOT INITIAL. - lo_ui5_model->add_attribute( n = `vViewPopup` v = request_end_popup( ) ). + lo_ui5_model->add_attribute( n = `vViewPopup` v = ms_next-s_set-xml_popup ). "request_end_popup( ) ). IF ms_next-s_set-popup_open_by_id IS NOT INITIAL. lo_ui5_model->add_attribute( n = `OPENBY` v = ms_next-s_set-popup_open_by_id ). ENDIF. @@ -1649,7 +1644,9 @@ CLASS z2ui5_lcl_system_runtime IMPLEMENTATION. assign lr_ref2->* to . DATA(lr_ref) = CAST data( ). IF lr_attri->gen_type IS INITIAL. - DATA(lo_datadescr) = cl_abap_datadescr=>describe_by_data( lr_ref->* ). + FIELD-SYMBOLS type any. + assign lr_ref->* to . + DATA(lo_datadescr) = cl_abap_datadescr=>describe_by_data( ). lr_attri->gen_type_kind = lo_datadescr->type_kind. lr_attri->gen_kind = lo_datadescr->kind. CASE lo_datadescr->kind. @@ -1802,16 +1799,6 @@ CLASS z2ui5_lcl_system_runtime IMPLEMENTATION. ENDMETHOD. - METHOD request_end_popup. - - rv_xml = _=>get_replace( iv_val = ms_next-s_set-xml_popup iv_begin = 'controllerName="' iv_end = '"' ). - REPLACE '' IN rv_xml WITH ``. - REPLACE '' IN rv_xml WITH ``. - REPLACE '' IN rv_xml WITH ``. - - ENDMETHOD. - ENDCLASS. CLASS z2ui5_lcl_if_client IMPLEMENTATION.