bugfixes and view separation (#149)

* view logic

* view updates

* bugfix

* abaplint fixes

* abaplint fixes
This commit is contained in:
oblomov 2023-04-10 15:06:47 +02:00
parent 90fce43ca8
commit d329bf527c
30 changed files with 151 additions and 135 deletions

View File

@ -32,7 +32,7 @@ CLASS z2ui5_cl_app_demo_01 IMPLEMENTATION.
client->nav_app_leave( client->get_app( client->get( )-id_prev_app_stack ) ). client->nav_app_leave( client->get_app( client->get( )-id_prev_app_stack ) ).
ENDCASE. ENDCASE.
client->set_next( VALUE #( xml_main = z2ui5_cl_xml_view_helper=>factory( client->set_next( VALUE #( xml_main = z2ui5_cl_xml_view_helper=>factory( )->shell(
)->page( )->page(
title = 'abap2UI5 - First Example' title = 'abap2UI5 - First Example'
navbuttonpress = client->_event( 'BACK' ) navbuttonpress = client->_event( 'BACK' )
@ -40,7 +40,7 @@ CLASS z2ui5_cl_app_demo_01 IMPLEMENTATION.
)->header_content( )->header_content(
)->link( )->link(
text = 'Source_Code' text = 'Source_Code'
href = client->get( )-url_source_code href = z2ui5_cl_xml_view_helper=>hlp_get_source_code_url( app = me get = client->get( ) )
)->get_parent( )->get_parent(
)->simple_form( title = 'Form Title' editable = abap_true )->simple_form( title = 'Form Title' editable = abap_true
)->content( 'form' )->content( 'form'

View File

@ -116,7 +116,7 @@ CLASS Z2UI5_CL_APP_DEMO_02 IMPLEMENTATION.
shownavbutton = abap_true shownavbutton = abap_true
)->header_content( )->header_content(
)->link( text = 'Demo' href = `https://twitter.com/OblomovDev/status/1628701535222865922` )->link( text = 'Demo' href = `https://twitter.com/OblomovDev/status/1628701535222865922`
)->link( text = 'Source_Code' href = client->get( )-url_source_code )->link( text = 'Source_Code' href = z2ui5_cl_xml_view_helper=>hlp_get_source_code_url( app = me get = client->get( ) )
)->get_parent( ). )->get_parent( ).
DATA(grid) = page->grid( 'L6 M12 S12' DATA(grid) = page->grid( 'L6 M12 S12'

View File

@ -55,7 +55,7 @@ CLASS Z2UI5_CL_APP_DEMO_03 IMPLEMENTATION.
)->header_content( )->header_content(
)->link( )->link(
text = 'Source_Code' text = 'Source_Code'
href = client->get( )-url_source_code href = z2ui5_cl_xml_view_helper=>hlp_get_source_code_url( app = me get = client->get( ) )
)->get_parent( ). )->get_parent( ).
page->list( page->list(

View File

@ -85,7 +85,7 @@ CLASS Z2UI5_CL_APP_DEMO_04 IMPLEMENTATION.
)->header_content( )->header_content(
)->link( )->link(
text = 'Source_Code' text = 'Source_Code'
href = client->get( )-url_source_code href = z2ui5_cl_xml_view_helper=>hlp_get_source_code_url( app = me get = client->get( ) )
)->get_parent( ). )->get_parent( ).
page->grid( 'L6 M12 S12' )->content( 'l' page->grid( 'L6 M12 S12' )->content( 'l'

View File

@ -92,7 +92,7 @@ CLASS Z2UI5_CL_APP_DEMO_05 IMPLEMENTATION.
)->header_content( )->header_content(
)->link( )->link(
text = 'Source_Code' text = 'Source_Code'
href = client->get( )-url_source_code href = z2ui5_cl_xml_view_helper=>hlp_get_source_code_url( app = me get = client->get( ) )
)->get_parent( ). )->get_parent( ).
page->generic_tag( page->generic_tag(

View File

@ -81,7 +81,7 @@ CLASS Z2UI5_CL_APP_DEMO_06 IMPLEMENTATION.
)->header_content( )->header_content(
)->link( )->link(
text = 'Source_Code' text = 'Source_Code'
href = client->get( )-url_source_code href = z2ui5_cl_xml_view_helper=>hlp_get_source_code_url( app = me get = client->get( ) )
)->get_parent( ). )->get_parent( ).
page->simple_form( title = 'Form Title' editable = abap_true page->simple_form( title = 'Form Title' editable = abap_true

View File

@ -169,7 +169,7 @@ CLASS z2ui5_cl_app_demo_07 IMPLEMENTATION.
)->header_content( ns = 'm' )->header_content( ns = 'm'
)->toolbar_spacer( ns = 'm' )->toolbar_spacer( ns = 'm'
)->link( ns = 'm' text = 'Demo' href = 'https://twitter.com/OblomovDev/status/1638487600930357248' )->link( ns = 'm' text = 'Demo' href = 'https://twitter.com/OblomovDev/status/1638487600930357248'
)->link( ns = 'm' text = 'Source_Code' href = client->get( )-url_source_code )->link( ns = 'm' text = 'Source_Code' href = z2ui5_cl_xml_view_helper=>hlp_get_source_code_url( app = me get = client->get( ) )
)->get_parent( ). )->get_parent( ).
page->text( ns = 'm' text = 'Custom Control for File Upload is now loaded.' page->text( ns = 'm' text = 'Custom Control for File Upload is now loaded.'
@ -191,7 +191,7 @@ CLASS z2ui5_cl_app_demo_07 IMPLEMENTATION.
)->header_content( )->header_content(
)->toolbar_spacer( )->toolbar_spacer(
)->link( text = 'Demo' href = 'https://twitter.com/OblomovDev/status/1638487600930357248' )->link( text = 'Demo' href = 'https://twitter.com/OblomovDev/status/1638487600930357248'
)->link( text = 'Source_Code' href = client->get( )-url_source_code )->link( text = 'Source_Code' href = z2ui5_cl_xml_view_helper=>hlp_get_source_code_url( app = me get = client->get( ) )
)->get_parent( ). )->get_parent( ).
page->zz_file_uploader( page->zz_file_uploader(

View File

@ -60,7 +60,7 @@ CLASS Z2UI5_CL_APP_DEMO_08 IMPLEMENTATION.
)->header_content( )->header_content(
)->link( )->link(
text = 'Source_Code' text = 'Source_Code'
href = client->get( )-url_source_code href = z2ui5_cl_xml_view_helper=>hlp_get_source_code_url( app = me get = client->get( ) )
)->get_parent( ). )->get_parent( ).
IF check_strip_active = abap_true. IF check_strip_active = abap_true.

View File

@ -218,7 +218,7 @@ CLASS Z2UI5_CL_APP_DEMO_09 IMPLEMENTATION.
href = 'https://twitter.com/OblomovDev/status/1637470531136921600' href = 'https://twitter.com/OblomovDev/status/1637470531136921600'
)->link( )->link(
text = 'Source_Code' text = 'Source_Code'
href = client->get( )-url_source_code href = z2ui5_cl_xml_view_helper=>hlp_get_source_code_url( app = me get = client->get( ) )
)->get_parent( ). )->get_parent( ).
DATA(form) = page->grid( 'L7 M7 S7' DATA(form) = page->grid( 'L7 M7 S7'

View File

@ -35,7 +35,8 @@ CLASS Z2UI5_CL_APP_DEMO_10 IMPLEMENTATION.
href = 'https://twitter.com/OblomovDev' href = 'https://twitter.com/OblomovDev'
)->link( )->link(
text = 'Source_Code' text = 'Source_Code'
href = client->get( )-url_source_code ). href = z2ui5_cl_xml_view_helper=>hlp_get_source_code_url( app = me get = client->get( ) )
).
page->sub_header( page->sub_header(
)->overflow_toolbar( )->overflow_toolbar(

View File

@ -71,7 +71,7 @@ CLASS Z2UI5_CL_APP_DEMO_11 IMPLEMENTATION.
href = 'https://twitter.com/OblomovDev/status/1630240894581608448' href = 'https://twitter.com/OblomovDev/status/1630240894581608448'
)->link( )->link(
text = 'Source_Code' text = 'Source_Code'
href = client->get( )-url_source_code href = z2ui5_cl_xml_view_helper=>hlp_get_source_code_url( app = me get = client->get( ) )
)->get_parent( ). )->get_parent( ).
DATA(tab) = page->table( DATA(tab) = page->table(

View File

@ -90,7 +90,7 @@ CLASS Z2UI5_CL_APP_DEMO_12 IMPLEMENTATION.
)->header_content( )->header_content(
)->link( )->link(
text = 'Source_Code' text = 'Source_Code'
href = client->get( )-url_source_code href = z2ui5_cl_xml_view_helper=>hlp_get_source_code_url( app = me get = client->get( ) )
)->get_parent( ). )->get_parent( ).
DATA(grid) = page->grid( 'L7 M12 S12' )->content( 'l' DATA(grid) = page->grid( 'L7 M12 S12' )->content( 'l'

View File

@ -170,7 +170,7 @@ CLASS Z2UI5_CL_APP_DEMO_13 IMPLEMENTATION.
href = `https://twitter.com/OblomovDev/status/1634206964291911682` href = `https://twitter.com/OblomovDev/status/1634206964291911682`
)->link( )->link(
text = 'Source_Code' text = 'Source_Code'
href = client->get( )-url_source_code href = z2ui5_cl_xml_view_helper=>hlp_get_source_code_url( app = me get = client->get( ) )
)->get_parent( )->get_parent(
)->sub_header( )->sub_header(
)->overflow_toolbar( )->overflow_toolbar(
@ -258,7 +258,7 @@ CLASS Z2UI5_CL_APP_DEMO_13 IMPLEMENTATION.
href = `https://twitter.com/OblomovDev/status/1634206964291911682` href = `https://twitter.com/OblomovDev/status/1634206964291911682`
)->link( )->link(
text = 'Source_Code' text = 'Source_Code'
href = client->get( )-url_source_code href = z2ui5_cl_xml_view_helper=>hlp_get_source_code_url( app = me get = client->get( ) )
)->get_parent( )->get_parent(
)->sub_header( )->sub_header(
)->overflow_toolbar( )->overflow_toolbar(
@ -322,7 +322,7 @@ CLASS Z2UI5_CL_APP_DEMO_13 IMPLEMENTATION.
href = `https://twitter.com/OblomovDev/status/1634206964291911682` href = `https://twitter.com/OblomovDev/status/1634206964291911682`
)->link( )->link(
text = 'Source_Code' text = 'Source_Code'
href = client->get( )-url_source_code href = z2ui5_cl_xml_view_helper=>hlp_get_source_code_url( app = me get = client->get( ) )
)->get_parent( )->get_parent(
)->sub_header( )->sub_header(
)->overflow_toolbar( )->overflow_toolbar(

View File

@ -57,7 +57,7 @@ CLASS Z2UI5_CL_APP_DEMO_14 IMPLEMENTATION.
shownavbutton = abap_true shownavbutton = abap_true
)->header_content( )->header_content(
)->link( text = 'Demo' href = 'https://twitter.com/OblomovDev/status/1631562906570575875' )->link( text = 'Demo' href = 'https://twitter.com/OblomovDev/status/1631562906570575875'
)->link( text = 'Source_Code' href = client->get( )-url_source_code )->link( text = 'Source_Code' href = z2ui5_cl_xml_view_helper=>hlp_get_source_code_url( app = me get = client->get( ) )
)->get_parent( ). )->get_parent( ).
DATA(grid) = page->grid( 'L7 M12 S12' )->content( 'l' ). DATA(grid) = page->grid( 'L7 M12 S12' )->content( 'l' ).

View File

@ -40,7 +40,7 @@ CLASS Z2UI5_CL_APP_DEMO_15 IMPLEMENTATION.
shownavbutton = abap_true shownavbutton = abap_true
)->header_content( )->header_content(
)->toolbar_spacer( )->toolbar_spacer(
)->link( text = 'Source_Code' href = client->get( )-url_source_code )->link( text = 'Source_Code' href = z2ui5_cl_xml_view_helper=>hlp_get_source_code_url( app = me get = client->get( ) )
)->get_parent( )->get_parent(
)->vbox( 'sapUiSmallMargin' )->vbox( 'sapUiSmallMargin'
)->link( )->link(

View File

@ -371,7 +371,7 @@ CLASS Z2UI5_CL_APP_DEMO_16 IMPLEMENTATION.
shownavbutton = abap_true shownavbutton = abap_true
)->header_content( )->header_content(
)->link( text = 'Demo' href = `https://twitter.com/OblomovDev/status/1639191954285113344` )->link( text = 'Demo' href = `https://twitter.com/OblomovDev/status/1639191954285113344`
)->link( text = 'Source_Code' href = client->get( )-url_source_code )->link( text = 'Source_Code' href = z2ui5_cl_xml_view_helper=>hlp_get_source_code_url( app = me get = client->get( ) )
)->get_parent( )->get_parent(
)->tab_container( ). )->tab_container( ).

View File

@ -132,7 +132,7 @@ CLASS z2ui5_cl_app_demo_18 IMPLEMENTATION.
)->header_content( )->header_content(
)->link( )->link(
text = 'Source_Code' text = 'Source_Code'
href = client->get( )-url_source_code href = z2ui5_cl_xml_view_helper=>hlp_get_source_code_url( app = me get = client->get( ) )
)->get_parent( )->get_parent(
)->simple_form( title = 'VIEW_MAIN' editable = abap_true )->simple_form( title = 'VIEW_MAIN' editable = abap_true
)->content( 'form' )->content( 'form'
@ -172,7 +172,7 @@ CLASS z2ui5_cl_app_demo_18 IMPLEMENTATION.
)->header_content( )->header_content(
)->link( )->link(
text = 'Source_Code' text = 'Source_Code'
href = client->get( )-url_source_code href = z2ui5_cl_xml_view_helper=>hlp_get_source_code_url( app = me get = client->get( ) )
)->get_parent( )->get_parent(
)->simple_form( 'VIEW_SECOND' )->simple_form( 'VIEW_SECOND'
)->content( 'form' )->content( 'form'

View File

@ -65,7 +65,7 @@ CLASS Z2UI5_CL_APP_DEMO_19 IMPLEMENTATION.
href = 'https://twitter.com/OblomovDev/status/1637852441671528448' href = 'https://twitter.com/OblomovDev/status/1637852441671528448'
)->link( )->link(
text = 'Source_Code' text = 'Source_Code'
href = client->get( )-url_source_code href = z2ui5_cl_xml_view_helper=>hlp_get_source_code_url( app = me get = client->get( ) )
)->get_parent( ). )->get_parent( ).
page->segmented_button( page->segmented_button(

View File

@ -83,7 +83,7 @@ CLASS Z2UI5_CL_APP_DEMO_21 IMPLEMENTATION.
text = 'Demo' text = 'Demo'
href = 'https://twitter.com/OblomovDev/status/1637163852264624139' href = 'https://twitter.com/OblomovDev/status/1637163852264624139'
)->link( )->link(
text = 'Source_Code' href = client->get( )-url_source_code text = 'Source_Code' href = z2ui5_cl_xml_view_helper=>hlp_get_source_code_url( app = me get = client->get( ) )
)->get_parent( ). )->get_parent( ).
DATA(grid) = page->grid( 'L8 M12 S12' )->content( 'l' ). DATA(grid) = page->grid( 'L8 M12 S12' )->content( 'l' ).

View File

@ -108,7 +108,7 @@ CLASS Z2UI5_CL_APP_DEMO_22 IMPLEMENTATION.
shownavbutton = abap_true shownavbutton = abap_true
). ).
page->header_content( )->link( text = 'Source_Code' href = client->get( )-url_source_code ). page->header_content( )->link( text = 'Source_Code' href = z2ui5_cl_xml_view_helper=>hlp_get_source_code_url( app = me get = client->get( ) ) ).
page->input( page->input(

View File

@ -7,9 +7,9 @@ CLASS z2ui5_cl_app_demo_23 DEFINITION PUBLIC.
DATA product TYPE string. DATA product TYPE string.
DATA quantity TYPE string. DATA quantity TYPE string.
data client type ref to z2ui5_if_client.
DATA: DATA:
BEGIN OF app, BEGIN OF app,
client TYPE REF TO z2ui5_if_client,
check_initialized TYPE abap_bool, check_initialized TYPE abap_bool,
view_main TYPE string, view_main TYPE string,
view_popup TYPE string, view_popup TYPE string,
@ -33,7 +33,7 @@ CLASS Z2UI5_CL_APP_DEMO_23 IMPLEMENTATION.
METHOD z2ui5_if_app~controller. METHOD z2ui5_if_app~controller.
app-client = client. me->client = client.
app-s_get = client->get( ). app-s_get = client->get( ).
" app-view_popup = ``. " app-view_popup = ``.
@ -61,7 +61,7 @@ CLASS Z2UI5_CL_APP_DEMO_23 IMPLEMENTATION.
CASE app-s_get-event. CASE app-s_get-event.
WHEN 'BACK'. WHEN 'BACK'.
app-client->nav_app_leave( app-client->get_app( app-s_get-id_prev_app_stack ) ). client->nav_app_leave( client->get_app( app-s_get-id_prev_app_stack ) ).
WHEN OTHERS. WHEN OTHERS.
app-view_main = app-s_get-event. app-view_main = app-s_get-event.
@ -105,15 +105,15 @@ CLASS Z2UI5_CL_APP_DEMO_23 IMPLEMENTATION.
` /> <Label ` && |\n| && ` /> <Label ` && |\n| &&
` text="quantity" ` && |\n| && ` text="quantity" ` && |\n| &&
` /> <Input ` && |\n| && ` /> <Input ` && |\n| &&
` value="` && app-client->_bind( quantity ) && `" ` && |\n| && ` value="` && client->_bind( quantity ) && `" ` && |\n| &&
` /> <Button ` && |\n| && ` /> <Button ` && |\n| &&
` press="` && app-client->_event( 'NORMAL' ) && `"` && |\n| && ` press="` && client->_event( 'NORMAL' ) && `"` && |\n| &&
` text="NORMAL" ` && |\n| && ` text="NORMAL" ` && |\n| &&
` /> <Button ` && |\n| && ` /> <Button ` && |\n| &&
` press="` && app-client->_event( 'GENERIC' ) && `"` && |\n| && ` press="` && client->_event( 'GENERIC' ) && `"` && |\n| &&
` text="GENERIC" ` && |\n| && ` text="GENERIC" ` && |\n| &&
` /> <Button ` && |\n| && ` /> <Button ` && |\n| &&
` press="` && app-client->_event( 'XML' ) && `"` && |\n| && ` press="` && client->_event( 'XML' ) && `"` && |\n| &&
` text="XML" ` && |\n| && ` text="XML" ` && |\n| &&
` /></f:content></f:SimpleForm></Page></Shell></mvc:View>`. ` /></f:content></f:SimpleForm></Page></Shell></mvc:View>`.
@ -123,27 +123,27 @@ CLASS Z2UI5_CL_APP_DEMO_23 IMPLEMENTATION.
app-s_next-xml_main = z2ui5_cl_xml_view_helper=>factory( app-s_next-xml_main = z2ui5_cl_xml_view_helper=>factory(
)->page( )->page(
title = 'abap2UI5 - NORMAL NORMAL NORMAL' title = 'abap2UI5 - NORMAL NORMAL NORMAL'
navbuttonpress = app-client->_event( 'BACK' ) navbuttonpress = client->_event( 'BACK' )
shownavbutton = abap_true shownavbutton = abap_true
)->header_content( )->header_content(
)->link( )->link(
text = 'Source_Code' text = 'Source_Code'
href = app-client->get( )-url_source_code href = z2ui5_cl_xml_view_helper=>hlp_get_source_code_url( app = me get = client->get( ) )
)->get_parent( )->get_parent(
)->simple_form( 'Form Title' )->simple_form( 'Form Title'
)->content( 'form' )->content( 'form'
)->title( 'Input' )->title( 'Input'
)->label( 'quantity' )->label( 'quantity'
)->input( app-client->_bind( quantity ) )->input( client->_bind( quantity )
)->button( )->button(
text = 'NORMAL' text = 'NORMAL'
press = app-client->_event( 'NORMAL' ) press = client->_event( 'NORMAL' )
)->button( )->button(
text = 'GENERIC' text = 'GENERIC'
press = app-client->_event( 'GENERIC' ) press = client->_event( 'GENERIC' )
)->button( )->button(
text = 'XML' text = 'XML'
press = app-client->_event( 'XML' ) press = client->_event( 'XML' )
)->get_root( )->xml_get( ). )->get_root( )->xml_get( ).
@ -156,7 +156,7 @@ CLASS Z2UI5_CL_APP_DEMO_23 IMPLEMENTATION.
t_prop = VALUE #( t_prop = VALUE #(
( n = `title` v = 'abap2UI5 - GENERIC GENERIC GENERIC' ) ( n = `title` v = 'abap2UI5 - GENERIC GENERIC GENERIC' )
( n = `showNavButton` v = `true` ) ( n = `showNavButton` v = `true` )
( n = `navButtonPress` v = app-client->_event( 'BACK' ) ) ( n = `navButtonPress` v = client->_event( 'BACK' ) )
) )->_generic( ) )->_generic(
name = `SimpleForm` name = `SimpleForm`
ns = `form` ns = `form`
@ -172,25 +172,25 @@ CLASS Z2UI5_CL_APP_DEMO_23 IMPLEMENTATION.
) )->get_parent( )->_generic( ) )->get_parent( )->_generic(
name = `Input` name = `Input`
t_prop = VALUE #( t_prop = VALUE #(
( n = `value` v = app-client->_bind( quantity ) ) ( n = `value` v = client->_bind( quantity ) )
) )->get_parent( ) )->get_parent(
)->_generic( )->_generic(
name = `Button` name = `Button`
t_prop = VALUE #( t_prop = VALUE #(
( n = `text` v = `NORMAL` ) ( n = `text` v = `NORMAL` )
( n = `press` v = app-client->_event( 'NORMAL' ) ) ) ( n = `press` v = client->_event( 'NORMAL' ) ) )
)->get_parent( )->get_parent(
)->_generic( )->_generic(
name = `Button` name = `Button`
t_prop = VALUE #( t_prop = VALUE #(
( n = `text` v = `GENERIC` ) ( n = `text` v = `GENERIC` )
( n = `press` v = app-client->_event( 'GENERIC' ) ) ) ( n = `press` v = client->_event( 'GENERIC' ) ) )
)->get_parent( )->get_parent(
)->_generic( )->_generic(
name = `Button` name = `Button`
t_prop = VALUE #( t_prop = VALUE #(
( n = `text` v = `XML` ) ( n = `text` v = `XML` )
( n = `press` v = app-client->_event( 'XML' ) ) ) ( n = `press` v = client->_event( 'XML' ) ) )
). ).
app-s_next-xml_main = li_view->get_root( )->xml_get( ). app-s_next-xml_main = li_view->get_root( )->xml_get( ).

View File

@ -57,7 +57,7 @@ CLASS z2ui5_cl_app_demo_24 IMPLEMENTATION.
)->page( title = 'abap2UI5 - flow logic - APP 01' navbuttonpress = client->_event( 'BACK' ) shownavbutton = abap_true )->page( title = 'abap2UI5 - flow logic - APP 01' navbuttonpress = client->_event( 'BACK' ) shownavbutton = abap_true
)->header_content( )->header_content(
)->link( text = 'Demo' href = `https://twitter.com/OblomovDev/status/1640743794206228480` )->link( text = 'Demo' href = `https://twitter.com/OblomovDev/status/1640743794206228480`
)->link( text = 'Source_Code' href = client->get( )-url_source_code )->link( text = 'Source_Code' href = z2ui5_cl_xml_view_helper=>hlp_get_source_code_url( app = me get = client->get( ) )
)->get_parent( )->get_parent(
)->grid( 'L6 M12 S12' )->content( 'l' )->grid( 'L6 M12 S12' )->content( 'l'

View File

@ -71,7 +71,7 @@ CLASS z2ui5_cl_app_demo_25 IMPLEMENTATION.
navbuttonpress = client->_event( 'BACK' ) shownavbutton = abap_true navbuttonpress = client->_event( 'BACK' ) shownavbutton = abap_true
)->header_content( )->header_content(
)->link( text = 'Demo' href = `https://twitter.com/OblomovDev/status/1640743794206228480` )->link( text = 'Demo' href = `https://twitter.com/OblomovDev/status/1640743794206228480`
)->link( text = 'Source_Code' href = client->get( )-url_source_code )->link( text = 'Source_Code' href = z2ui5_cl_xml_view_helper=>hlp_get_source_code_url( app = me get = client->get( ) )
)->get_parent( ). )->get_parent( ).
page->grid( 'L6 M12 S12' )->content( 'l' page->grid( 'L6 M12 S12' )->content( 'l'
@ -97,7 +97,7 @@ CLASS z2ui5_cl_app_demo_25 IMPLEMENTATION.
navbuttonpress = client->_event( 'BACK' ) shownavbutton = abap_true navbuttonpress = client->_event( 'BACK' ) shownavbutton = abap_true
)->header_content( )->header_content(
)->link( text = 'Demo' href = `https://twitter.com/OblomovDev/status/1640743794206228480` )->link( text = 'Demo' href = `https://twitter.com/OblomovDev/status/1640743794206228480`
)->link( text = 'Source_Code' href = client->get( )-url_source_code )->link( text = 'Source_Code' href = z2ui5_cl_xml_view_helper=>hlp_get_source_code_url( app = me get = client->get( ) )
)->get_parent( ). )->get_parent( ).
page->grid( 'L6 M12 S12' )->content( 'l' page->grid( 'L6 M12 S12' )->content( 'l'

View File

@ -10,9 +10,9 @@ CLASS z2ui5_cl_app_demo_26 DEFINITION PUBLIC.
PROTECTED SECTION. PROTECTED SECTION.
data client TYPE REF TO z2ui5_if_client.
DATA: DATA:
BEGIN OF app, BEGIN OF app,
client TYPE REF TO z2ui5_if_client,
check_initialized TYPE abap_bool, check_initialized TYPE abap_bool,
view_main TYPE string, view_main TYPE string,
view_popup TYPE string, view_popup TYPE string,
@ -35,7 +35,7 @@ CLASS Z2UI5_CL_APP_DEMO_26 IMPLEMENTATION.
METHOD z2ui5_if_app~controller. METHOD z2ui5_if_app~controller.
app-client = client. me->client = client.
app-s_get = client->get( ). app-s_get = client->get( ).
app-view_popup = ``. app-view_popup = ``.
@ -77,15 +77,15 @@ CLASS Z2UI5_CL_APP_DEMO_26 IMPLEMENTATION.
app-s_next-popup_open_by_id = 'TEST'. app-s_next-popup_open_by_id = 'TEST'.
WHEN 'BUTTON_CONFIRM'. WHEN 'BUTTON_CONFIRM'.
app-client->popup_message_toast( |confirm| ). client->popup_message_toast( |confirm| ).
app-view_popup = ''. app-view_popup = ''.
WHEN 'BUTTON_CANCEL'. WHEN 'BUTTON_CANCEL'.
app-client->popup_message_toast( |cancel| ). client->popup_message_toast( |cancel| ).
app-view_popup = ''. app-view_popup = ''.
WHEN 'BACK'. WHEN 'BACK'.
app-client->nav_app_leave( app-client->get_app( app-s_get-id_prev_app_stack ) ). client->nav_app_leave( client->get_app( app-s_get-id_prev_app_stack ) ).
ENDCASE. ENDCASE.
@ -101,12 +101,12 @@ CLASS Z2UI5_CL_APP_DEMO_26 IMPLEMENTATION.
app-s_next-xml_main = z2ui5_cl_xml_view_helper=>factory( app-s_next-xml_main = z2ui5_cl_xml_view_helper=>factory(
)->page( )->page(
title = 'abap2UI5 - Popover Examples' title = 'abap2UI5 - Popover Examples'
navbuttonpress = app-client->_event( 'BACK' ) navbuttonpress = client->_event( 'BACK' )
shownavbutton = abap_true shownavbutton = abap_true
)->header_content( )->header_content(
)->link( )->link(
text = 'Source_Code' text = 'Source_Code'
href = app-client->get( )-url_source_code href = z2ui5_cl_xml_view_helper=>hlp_get_source_code_url( app = me get = client->get( ) )
)->get_parent( )->get_parent(
)->simple_form( 'Popover' )->simple_form( 'Popover'
)->content( 'form' )->content( 'form'
@ -114,7 +114,7 @@ CLASS Z2UI5_CL_APP_DEMO_26 IMPLEMENTATION.
)->label( 'Link' )->label( 'Link'
)->link( text = 'Documentation UI5 Popover Control' href = 'https://openui5.hana.ondemand.com/entity/sap.m.Popover' )->link( text = 'Documentation UI5 Popover Control' href = 'https://openui5.hana.ondemand.com/entity/sap.m.Popover'
)->label( 'placement' )->label( 'placement'
)->segmented_button( app-client->_bind( mv_placement ) )->segmented_button( client->_bind( mv_placement )
)->items( )->items(
)->segmented_button_item( )->segmented_button_item(
key = 'Left' key = 'Left'
@ -136,14 +136,14 @@ CLASS Z2UI5_CL_APP_DEMO_26 IMPLEMENTATION.
)->label( 'popover' )->label( 'popover'
)->button( )->button(
text = 'show' text = 'show'
press = app-client->_event( 'POPOVER' ) press = client->_event( 'POPOVER' )
id = 'TEST' id = 'TEST'
)->button( )->button(
text = 'cancel' text = 'cancel'
press = app-client->_event( 'POPOVER' ) press = client->_event( 'POPOVER' )
)->button( )->button(
text = 'post' text = 'post'
press = app-client->_event( 'POPOVER' ) press = client->_event( 'POPOVER' )
)->get_root( )->xml_get( ). )->get_root( )->xml_get( ).
@ -165,15 +165,14 @@ CLASS Z2UI5_CL_APP_DEMO_26 IMPLEMENTATION.
app-s_next-xml_popup = z2ui5_cl_xml_view_helper=>factory( )->popover( app-s_next-xml_popup = z2ui5_cl_xml_view_helper=>factory( )->popover(
title = 'Popover Title' title = 'Popover Title'
placement = mv_placement placement = mv_placement
" icon = 'sap-icon://edit'
)->footer( )->overflow_toolbar( )->footer( )->overflow_toolbar(
)->toolbar_spacer( )->toolbar_spacer(
)->button( )->button(
text = 'Cancel' text = 'Cancel'
press = app-client->_event( 'BUTTON_CANCEL' ) press = client->_event( 'BUTTON_CANCEL' )
)->button( )->button(
text = 'Confirm' text = 'Confirm'
press = app-client->_event( 'BUTTON_CONFIRM' ) press = client->_event( 'BUTTON_CONFIRM' )
type = 'Emphasized' type = 'Emphasized'
)->get_parent( )->get_parent( )->get_parent( )->get_parent(
)->text( 'make an input here:' )->text( 'make an input here:'

View File

@ -15,9 +15,9 @@ CLASS z2ui5_cl_app_demo_27 DEFINITION PUBLIC.
DATA input52 TYPE string. DATA input52 TYPE string.
PROTECTED SECTION. PROTECTED SECTION.
data client TYPE REF TO z2ui5_if_client.
DATA: DATA:
BEGIN OF app, BEGIN OF app,
client TYPE REF TO z2ui5_if_client,
check_initialized TYPE abap_bool, check_initialized TYPE abap_bool,
view_main TYPE string, view_main TYPE string,
view_popup TYPE string, view_popup TYPE string,
@ -39,7 +39,7 @@ CLASS Z2UI5_CL_APP_DEMO_27 IMPLEMENTATION.
METHOD z2ui5_if_app~controller. METHOD z2ui5_if_app~controller.
app-client = client. me->client = client.
app-s_get = client->get( ). app-s_get = client->get( ).
app-view_popup = ``. app-view_popup = ``.
@ -66,19 +66,19 @@ CLASS Z2UI5_CL_APP_DEMO_27 IMPLEMENTATION.
CASE app-s_get-event. CASE app-s_get-event.
WHEN 'BUTTON_POST'. WHEN 'BUTTON_POST'.
app-client->popup_message_toast( |{ product } { quantity } - send to the server| ). client->popup_message_toast( |{ product } { quantity } - send to the server| ).
app-view_popup = 'POPUP_CONFIRM'. app-view_popup = 'POPUP_CONFIRM'.
WHEN 'BUTTON_CONFIRM'. WHEN 'BUTTON_CONFIRM'.
app-client->popup_message_toast( |confirm| ). client->popup_message_toast( |confirm| ).
app-view_popup = ''. app-view_popup = ''.
WHEN 'BUTTON_CANCEL'. WHEN 'BUTTON_CANCEL'.
app-client->popup_message_toast( |cancel| ). client->popup_message_toast( |cancel| ).
app-view_popup = ''. app-view_popup = ''.
WHEN 'BACK'. WHEN 'BACK'.
app-client->nav_app_leave( app-client->get_app( app-s_get-id_prev_app_stack ) ). client->nav_app_leave( client->get_app( app-s_get-id_prev_app_stack ) ).
ENDCASE. ENDCASE.
@ -101,12 +101,12 @@ CLASS Z2UI5_CL_APP_DEMO_27 IMPLEMENTATION.
app-s_next-xml_main = z2ui5_cl_xml_view_helper=>factory( app-s_next-xml_main = z2ui5_cl_xml_view_helper=>factory(
)->page( )->page(
title = 'abap2UI5 - Binding Syntax' title = 'abap2UI5 - Binding Syntax'
navbuttonpress = app-client->_event( 'BACK' ) navbuttonpress = client->_event( 'BACK' )
shownavbutton = abap_true shownavbutton = abap_true
)->header_content( )->header_content(
)->link( )->link(
text = 'Source_Code' text = 'Source_Code'
href = app-client->get( )-url_source_code href = z2ui5_cl_xml_view_helper=>hlp_get_source_code_url( app = me get = client->get( ) )
)->get_parent( )->get_parent(
)->simple_form( title = 'Binding Syntax' editable = abap_true )->simple_form( title = 'Binding Syntax' editable = abap_true
)->content( 'form' )->content( 'form'
@ -117,43 +117,43 @@ CLASS Z2UI5_CL_APP_DEMO_27 IMPLEMENTATION.
text = 'Expression Binding' text = 'Expression Binding'
href = 'https://sapui5.hana.ondemand.com/sdk/#/topic/daf6852a04b44d118963968a1239d2c0' href = 'https://sapui5.hana.ondemand.com/sdk/#/topic/daf6852a04b44d118963968a1239d2c0'
)->label( 'input in uppercase' )->label( 'input in uppercase'
)->input( app-client->_bind( input2 ) )->input( client->_bind( input2 )
)->input( )->input(
value = '{= $' && app-client->_bind( input2 ) && '.toUpperCase() }' value = '{= $' && client->_bind( input2 ) && '.toUpperCase() }'
enabled = abap_false enabled = abap_false
)->label( 'max value of the first two inputs' )->label( 'max value of the first two inputs'
)->input( '{ type : "sap.ui.model.type.Integer",' && )->input( '{ type : "sap.ui.model.type.Integer",' &&
' path:"' && app-client->_bind( val = input31 path = abap_true ) && '" }' ' path:"' && client->_bind( val = input31 path = abap_true ) && '" }'
)->input( '{ type : "sap.ui.model.type.Integer",' && |\n| && )->input( '{ type : "sap.ui.model.type.Integer",' && |\n| &&
' path:"' && app-client->_bind( val = input32 path = abap_true ) && '" }' ' path:"' && client->_bind( val = input32 path = abap_true ) && '" }'
)->input( )->input(
value = '{= Math.max($' && app-client->_bind( input31 ) &&', $' && app-client->_bind( input32 ) && ') }' value = '{= Math.max($' && client->_bind( input31 ) &&', $' && client->_bind( input32 ) && ') }'
enabled = abap_false enabled = abap_false
)->label( 'only enabled when the quantity equals 500' )->label( 'only enabled when the quantity equals 500'
)->input( '{ type : "sap.ui.model.type.Integer",' && )->input( '{ type : "sap.ui.model.type.Integer",' &&
' path:"' && app-client->_bind( val = quantity path = abap_true ) && `" }` ' path:"' && client->_bind( val = quantity path = abap_true ) && `" }`
)->input( )->input(
value = product value = product
enabled = '{= 500===$' && app-client->_bind( quantity ) && ' }' enabled = '{= 500===$' && client->_bind( quantity ) && ' }'
)->label( 'RegExp Set to enabled if the input contains VIP, ignoring the case.' )->label( 'RegExp Set to enabled if the input contains VIP, ignoring the case.'
)->input( app-client->_bind( val = input41 ) )->input( client->_bind( val = input41 )
)->button( )->button(
text = 'VIP' text = 'VIP'
enabled = '{= RegExp(''vip'', ''i'').test($' && app-client->_bind( input41 ) && ') }' enabled = '{= RegExp(''vip'', ''i'').test($' && client->_bind( input41 ) && ') }'
)->label( 'concatenate both inputs' )->label( 'concatenate both inputs'
)->input( app-client->_bind( val = input51 ) )->input( client->_bind( val = input51 )
)->input( app-client->_bind( val = input52 ) )->input( client->_bind( val = input52 )
)->input( )->input(
value = '{ parts: [' && |\n| && value = '{ parts: [' && |\n| &&
' "' && app-client->_bind( val = input51 path = abap_true ) && '",' && |\n| && ' "' && client->_bind( val = input51 path = abap_true ) && '",' && |\n| &&
' "' && app-client->_bind( val = input52 path = abap_true ) && '"' && |\n| && ' "' && client->_bind( val = input52 path = abap_true ) && '"' && |\n| &&
' ] }' ' ] }'
enabled = abap_false enabled = abap_false

View File

@ -12,8 +12,8 @@ CLASS z2ui5_cl_xml_view_helper DEFINITION
END OF ty_s_name_value. END OF ty_s_name_value.
TYPES ty_t_name_value TYPE STANDARD TABLE OF ty_s_name_value WITH EMPTY KEY. TYPES ty_t_name_value TYPE STANDARD TABLE OF ty_s_name_value WITH EMPTY KEY.
DATA m_name TYPE string. DATA m_name TYPE string.
DATA m_ns TYPE string. DATA m_ns TYPE string.
DATA mt_prop TYPE ty_t_name_value. DATA mt_prop TYPE ty_t_name_value.
DATA m_root TYPE REF TO z2ui5_cl_xml_view_helper. DATA m_root TYPE REF TO z2ui5_cl_xml_view_helper.
@ -27,6 +27,13 @@ CLASS z2ui5_cl_xml_view_helper DEFINITION
RETURNING RETURNING
VALUE(result) TYPE REF TO z2ui5_cl_xml_view_helper. VALUE(result) TYPE REF TO z2ui5_cl_xml_view_helper.
CLASS-METHODS hlp_get_source_code_url
IMPORTING
app TYPE ref to z2ui5_if_app
get TYPE z2ui5_if_client=>ty_s_get
RETURNING
VALUE(result) TYPE string.
METHODS constructor METHODS constructor
IMPORTING IMPORTING
ns TYPE string_table OPTIONAL. ns TYPE string_table OPTIONAL.
@ -2054,10 +2061,12 @@ CLASS z2ui5_cl_xml_view_helper IMPLEMENTATION.
METHOD title. METHOD title.
data(lv_name) = COND #( WHEN ns = 'f' THEN 'title' ELSE `Title` ).
result = me. result = me.
_generic( _generic(
ns = ns ns = ns
name = COND #( WHEN ns = 'f' THEN 'title' ELSE `Title` ) name = lv_name
t_prop = VALUE #( t_prop = VALUE #(
( n = `text` v = text ) ( n = `text` v = text )
( n = `wrapping` v = _=>get_json_boolean( wrapping ) ) ( n = `wrapping` v = _=>get_json_boolean( wrapping ) )
@ -2283,10 +2292,21 @@ CLASS z2ui5_cl_xml_view_helper IMPLEMENTATION.
METHOD shell. METHOD shell.
result = _generic( result = _generic(
name = `Shell` name = `Shell`
ns = ns ns = ns
). ).
ENDMETHOD.
METHOD hlp_get_source_code_url.
DATA(lv_url) = get-t_req_header[ name = `referer` ]-value.
SPLIT lv_url AT '?' INTO lv_url DATA(lv_dummy).
" result-url_app = lv_url && `?sap-client=` && sy-mandt && `&app=` && _=>get_classname_by_ref( mo_runtime->ms_db-o_app ).
result = z2ui5_cl_http_handler=>client-t_header[ name = `origin` ]-value && `/sap/bc/adt/oo/classes/` && _=>get_classname_by_ref( app ) && `/source/main`.
ENDMETHOD. ENDMETHOD.

View File

@ -14,6 +14,12 @@ CLASS z2ui5_lcl_utility DEFINITION INHERITING FROM cx_no_check.
RETURNING RETURNING
VALUE(result) TYPE abap_bool. VALUE(result) TYPE abap_bool.
CLASS-METHODS get_classname_by_ref
IMPORTING
in TYPE REF TO object
RETURNING
VALUE(result) TYPE string.
PROTECTED SECTION. PROTECTED SECTION.
PRIVATE SECTION. PRIVATE SECTION.
@ -21,7 +27,12 @@ ENDCLASS.
CLASS z2ui5_lcl_utility IMPLEMENTATION. CLASS z2ui5_lcl_utility IMPLEMENTATION.
METHOD get_classname_by_ref.
DATA(lv_classname) = cl_abap_classdescr=>get_class_name( in ).
result = substring_after( val = lv_classname sub = `\CLASS=` ).
ENDMETHOD.
METHOD get_json_boolean. METHOD get_json_boolean.

View File

@ -74,9 +74,9 @@ CLASS z2ui5_cl_http_handler IMPLEMENTATION.
( name = to_upper( row-name ) value = to_upper( row-value ) ) ). ( name = to_upper( row-name ) value = to_upper( row-value ) ) ).
DATA(lv_url) = client-t_header[ name = '~path' ]-value. DATA(lv_url) = client-t_header[ name = '~path' ]-value.
TRY. TRY.
DATA(lv_app) = client-t_param[ name = 'APP' ]-value. DATA(lv_app) = client-t_param[ name = 'APP' ]-value.
lv_url = lv_url && `?app=` && lv_app.
CATCH cx_root. CATCH cx_root.
ENDTRY. ENDTRY.
@ -105,13 +105,11 @@ CLASS z2ui5_cl_http_handler IMPLEMENTATION.
r_result = r_result && `<script>` && |\n| && r_result = r_result && `<script id="z2ui5">` && |\n| &&
` sap.ui.getCore().attachInit(function () {` && |\n| && ` sap.ui.getCore().attachInit(function () {` && |\n| &&
` "use strict";` && |\n| && ` "use strict";` && |\n| &&
|\n| && |\n| &&
` sap.ui.define(["sap/ui/core/mvc/Controller", "sap/ui/model/json/JSONModel", "sap/m/MessageBox", "sap/ui/core/Fragment"], function (Controller, JSONModel, MessageBox, Fragment) {` && |\n| && ` sap.ui.controller("z2ui5_controller", {` && |\n| &&
` "use strict";` && |\n| &&
` return Controller.extend("z2ui5_controller", {` && |\n| &&
|\n| && |\n| &&
` onAfterRendering: function () {` && |\n| && ` onAfterRendering: function () {` && |\n| &&
` var oView = this.getView();` && |\n| && ` var oView = this.getView();` && |\n| &&
@ -140,11 +138,13 @@ CLASS z2ui5_cl_http_handler IMPLEMENTATION.
` }));` && |\n| && ` }));` && |\n| &&
` }` && |\n| && ` }` && |\n| &&
` if (sap.z2ui5.oResponse.vViewPopup) {` && |\n| && ` if (sap.z2ui5.oResponse.vViewPopup) {` && |\n| &&
` new sap.ui.core.Fragment.load({` && |\n| && ` ` && |\n| &&
` jQuery.sap.require("sap.ui.core.Fragment");` && |\n| &&
` sap.ui.core.Fragment.load({` && |\n| &&
` definition: sap.z2ui5.oResponse.vViewPopup,` && |\n| && ` definition: sap.z2ui5.oResponse.vViewPopup,` && |\n| &&
` controller: this,` && |\n| && ` controller: this,` && |\n| &&
` }).then(function (oFragment) {` && |\n| && ` }).then(function (oFragment) {` && |\n| &&
` oFragment.setModel(new JSONModel(sap.z2ui5.oResponse.oViewModel))` && |\n| && ` oFragment.setModel(new sap.ui.model.json.JSONModel(sap.z2ui5.oResponse.oViewModel))` && |\n| &&
` this.getView().addDependent(oFragment);` && |\n| && ` this.getView().addDependent(oFragment);` && |\n| &&
` if (!sap.z2ui5.oResponse.OPENBY) { oFragment.open(); } else {` && |\n| && ` if (!sap.z2ui5.oResponse.OPENBY) { oFragment.open(); } else {` && |\n| &&
` oFragment.openBy(this.getView().byId(sap.z2ui5.oResponse.OPENBY))` && |\n| && ` oFragment.openBy(this.getView().byId(sap.z2ui5.oResponse.OPENBY))` && |\n| &&
@ -206,8 +206,13 @@ CLASS z2ui5_cl_http_handler IMPLEMENTATION.
|\n| && |\n| &&
` Roundtrip: function () {` && |\n| && ` Roundtrip: function () {` && |\n| &&
|\n| && |\n| &&
` if (sap.z2ui5.oView){ sap.z2ui5.oView.destroy( ); }` && |\n| &&
` var xhr = new XMLHttpRequest();` && |\n| && ` var xhr = new XMLHttpRequest();` && |\n| &&
` var url = '` && lv_url && `';` && |\n| && ` if ( sap.startApp ) { var app = sap.startApp; }else` && |\n| &&
` { ` && |\n| &&
` app = ' ` && lv_app && `'; ` && |\n| &&
` }` && |\n| &&
` var url = '` && lv_url && `?app=' + app;` && |\n| &&
` xhr.open("POST", url, true);` && |\n| && ` xhr.open("POST", url, true);` && |\n| &&
` xhr.onload = function (that) {` && |\n| && ` xhr.onload = function (that) {` && |\n| &&
|\n| && |\n| &&
@ -235,17 +240,18 @@ CLASS z2ui5_cl_http_handler IMPLEMENTATION.
` }` && |\n| && ` }` && |\n| &&
|\n| && |\n| &&
` if (sap.z2ui5.oResponse.vView) {` && |\n| && ` if (sap.z2ui5.oResponse.vView) {` && |\n| &&
` var oModel = new JSONModel(sap.z2ui5.oResponse.oViewModel);` && |\n| && ` var oModel = new sap.ui.model.json.JSONModel(sap.z2ui5.oResponse.oViewModel);` && |\n| &&
` var oView = new sap.ui.core.mvc.XMLView.create({` && |\n| && ` var oView = new sap.ui.core.mvc.XMLView.create({` && |\n| &&
` definition: sap.z2ui5.oResponse.vView,` && |\n| && ` definition: sap.z2ui5.oResponse.vView,` && |\n| &&
` }).then(oView => {` && |\n| && ` }).then(oView => {` && |\n| &&
` oView.setModel(oModel);` && |\n| && ` oView.setModel(oModel);` && |\n| &&
` debugger;` && |\n| &&
` oView.placeAt("content");` && |\n| && ` oView.placeAt("content");` && |\n| &&
` this.oView = oView;` && |\n| && ` this.oView = oView;` && |\n| &&
` sap.z2ui5.oView = oView;` && |\n| && ` sap.z2ui5.oView = oView;` && |\n| &&
` });` && |\n| && ` });` && |\n| &&
` } else if (sap.z2ui5.oResponse.SET_PREV_VIEW == true) {` && |\n| && ` } else if (sap.z2ui5.oResponse.SET_PREV_VIEW == true) {` && |\n| &&
` var oModel = new JSONModel(sap.z2ui5.oResponseOld.oViewModel);` && |\n| && ` var oModel = new sap.ui.model.json.JSONModel(sap.z2ui5.oResponseOld.oViewModel);` && |\n| &&
` var oView = new sap.ui.core.mvc.XMLView.create({` && |\n| && ` var oView = new sap.ui.core.mvc.XMLView.create({` && |\n| &&
` definition: sap.z2ui5.oResponseOld.vView` && |\n| && ` definition: sap.z2ui5.oResponseOld.vView` && |\n| &&
` }).then(oView => {` && |\n| && ` }).then(oView => {` && |\n| &&
@ -259,20 +265,17 @@ CLASS z2ui5_cl_http_handler IMPLEMENTATION.
` xhr.send(JSON.stringify(this.oBody));` && |\n| && ` xhr.send(JSON.stringify(this.oBody));` && |\n| &&
` },` && |\n| && ` },` && |\n| &&
` });` && |\n| && ` });` && |\n| &&
` });` && |\n| &&
|\n| && |\n| &&
` sap.z2ui5 = {};` && |\n| && ` if (!sap.z2ui5) {sap.z2ui5 = {}; };` && |\n| &&
` var oView = new sap.ui.core.mvc.View.create({` && |\n| && ` var xml = '<mvc:View controllerName="z2ui5_controller" xmlns:mvc="sap.ui.core.mvc" />';` && |\n| &&
` type: 'XML',` && |\n| && ` if (xml == '') { xml = '&lt;mvc:View controllerName="z2ui5_controller" xmlns:mvc="sap.ui.core.mvc" />' };` && |\n| &&
` definition: "<mvc:View controllerName='z2ui5_controller' xmlns:mvc='sap.ui.core.mvc' />",` && |\n| && |\n| &&
` }).then(oView => {` && |\n| && ` debugger;` && |\n| &&
` oView.getController().Roundtrip();` && |\n| && ` var oView = sap.ui.xmlview({viewContent:xml});` && |\n| &&
` });` && |\n| && ` oView.getController().Roundtrip();` && |\n| &&
|\n| && |\n| &&
` });` && |\n| && ` });` && |\n| &&
|\n| &&
`</script>` && |\n| && `</script>` && |\n| &&
|\n| &&
`</html>`. `</html>`.
ENDMETHOD. ENDMETHOD.

View File

@ -43,12 +43,6 @@ CLASS z2ui5_lcl_utility DEFINITION INHERITING FROM cx_no_check.
RETURNING RETURNING
VALUE(result) TYPE string. VALUE(result) TYPE string.
CLASS-METHODS get_classname_by_ref
IMPORTING
in TYPE REF TO object
RETURNING
VALUE(result) TYPE string.
CLASS-METHODS get_uuid CLASS-METHODS get_uuid
RETURNING RETURNING
VALUE(result) TYPE string. VALUE(result) TYPE string.
@ -231,14 +225,6 @@ CLASS z2ui5_lcl_utility IMPLEMENTATION.
ENDMETHOD. ENDMETHOD.
METHOD get_classname_by_ref.
DATA(lv_classname) = cl_abap_classdescr=>get_class_name( in ).
result = substring_after( val = lv_classname sub = `\CLASS=` ).
ENDMETHOD.
METHOD get_replace. METHOD get_replace.
result = iv_val. result = iv_val.
@ -913,7 +899,6 @@ CLASS z2ui5_lcl_system_runtime DEFINITION.
BEGIN OF ty_s_next, BEGIN OF ty_s_next,
check_app_leave TYPE abap_bool, check_app_leave TYPE abap_bool,
o_call_app TYPE REF TO z2ui5_if_app, o_call_app TYPE REF TO z2ui5_if_app,
" s_nav_app_call_new TYPE ty_s_db,
t_after TYPE _=>ty_tt_string, t_after TYPE _=>ty_tt_string,
s_set TYPE z2ui5_if_client=>ty_S_next, s_set TYPE z2ui5_if_client=>ty_S_next,
END OF ty_s_next. END OF ty_s_next.
@ -1491,7 +1476,7 @@ CLASS z2ui5_lcl_system_runtime IMPLEMENTATION.
TRY. TRY.
DATA(lv_classname) = to_upper( z2ui5_cl_http_handler=>client-t_param[ name = `app` ]-value ). DATA(lv_classname) = to_upper( z2ui5_cl_http_handler=>client-t_param[ name = `app` ]-value ).
_=>raise( when = xsdbool( lv_classname = `` ) ).
CATCH cx_root. CATCH cx_root.
result = result->set_app_system( ). result = result->set_app_system( ).
RETURN. RETURN.
@ -1739,15 +1724,12 @@ CLASS z2ui5_lcl_if_client IMPLEMENTATION.
METHOD z2ui5_if_client~get. METHOD z2ui5_if_client~get.
result = mo_runtime->ms_actual. result = VALUE #( BASE CORRESPONDING #( mo_runtime->ms_db )
event = mo_runtime->ms_actual-event
DATA(lv_url) = z2ui5_cl_http_handler=>client-t_header[ name = `referer` ]-value. event_data = mo_runtime->ms_actual-event_data
SPLIT lv_url AT '?' INTO lv_url DATA(lv_dummy). t_req_header = z2ui5_cl_http_handler=>client-t_header
result-id = mo_runtime->ms_db-id. t_req_param = z2ui5_cl_http_handler=>client-t_param
result-id_prev_app = mo_runtime->ms_db-id_prev_app. ).
result-id_prev_app_stack = mo_runtime->ms_db-id_prev_app_stack.
result-url_app = lv_url && `?sap-client=` && sy-mandt && `&app=` && _=>get_classname_by_ref( mo_runtime->ms_db-o_app ).
result-url_source_code = z2ui5_cl_http_handler=>client-t_header[ name = `origin` ]-value && `/sap/bc/adt/oo/classes/` && _=>get_classname_by_ref( mo_runtime->ms_db-o_app ) && `/source/main`.
ENDMETHOD. ENDMETHOD.

View File

@ -16,8 +16,8 @@ INTERFACE z2ui5_if_client
id_prev TYPE string, id_prev TYPE string,
id_prev_app TYPE string, id_prev_app TYPE string,
id_prev_app_stack TYPE string, id_prev_app_stack TYPE string,
url_app TYPE string, t_req_param type ty_t_name_value,
url_source_code TYPE string, t_req_header type ty_t_name_value,
END OF ty_s_get. END OF ty_s_get.
TYPES: TYPES: