diff --git a/src/00/z2ui5_cl_app_demo_01.clas.abap b/src/00/z2ui5_cl_app_demo_01.clas.abap
index d06c1831..f221d23f 100644
--- a/src/00/z2ui5_cl_app_demo_01.clas.abap
+++ b/src/00/z2ui5_cl_app_demo_01.clas.abap
@@ -32,7 +32,7 @@ CLASS z2ui5_cl_app_demo_01 IMPLEMENTATION.
client->nav_app_leave( client->get_app( client->get( )-id_prev_app_stack ) ).
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(
title = 'abap2UI5 - First Example'
navbuttonpress = client->_event( 'BACK' )
@@ -40,7 +40,7 @@ CLASS z2ui5_cl_app_demo_01 IMPLEMENTATION.
)->header_content(
)->link(
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(
)->simple_form( title = 'Form Title' editable = abap_true
)->content( 'form'
diff --git a/src/00/z2ui5_cl_app_demo_02.clas.abap b/src/00/z2ui5_cl_app_demo_02.clas.abap
index 0ec78273..eadf2b60 100644
--- a/src/00/z2ui5_cl_app_demo_02.clas.abap
+++ b/src/00/z2ui5_cl_app_demo_02.clas.abap
@@ -116,7 +116,7 @@ CLASS Z2UI5_CL_APP_DEMO_02 IMPLEMENTATION.
shownavbutton = abap_true
)->header_content(
)->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( ).
DATA(grid) = page->grid( 'L6 M12 S12'
diff --git a/src/00/z2ui5_cl_app_demo_03.clas.abap b/src/00/z2ui5_cl_app_demo_03.clas.abap
index 6da3714b..93c5364a 100644
--- a/src/00/z2ui5_cl_app_demo_03.clas.abap
+++ b/src/00/z2ui5_cl_app_demo_03.clas.abap
@@ -55,7 +55,7 @@ CLASS Z2UI5_CL_APP_DEMO_03 IMPLEMENTATION.
)->header_content(
)->link(
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( ).
page->list(
diff --git a/src/00/z2ui5_cl_app_demo_04.clas.abap b/src/00/z2ui5_cl_app_demo_04.clas.abap
index 23bfe0c5..987883c3 100644
--- a/src/00/z2ui5_cl_app_demo_04.clas.abap
+++ b/src/00/z2ui5_cl_app_demo_04.clas.abap
@@ -85,7 +85,7 @@ CLASS Z2UI5_CL_APP_DEMO_04 IMPLEMENTATION.
)->header_content(
)->link(
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( ).
page->grid( 'L6 M12 S12' )->content( 'l'
diff --git a/src/00/z2ui5_cl_app_demo_05.clas.abap b/src/00/z2ui5_cl_app_demo_05.clas.abap
index bd6d116e..40a1c9c4 100644
--- a/src/00/z2ui5_cl_app_demo_05.clas.abap
+++ b/src/00/z2ui5_cl_app_demo_05.clas.abap
@@ -92,7 +92,7 @@ CLASS Z2UI5_CL_APP_DEMO_05 IMPLEMENTATION.
)->header_content(
)->link(
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( ).
page->generic_tag(
diff --git a/src/00/z2ui5_cl_app_demo_06.clas.abap b/src/00/z2ui5_cl_app_demo_06.clas.abap
index 9116a5b5..728281f5 100644
--- a/src/00/z2ui5_cl_app_demo_06.clas.abap
+++ b/src/00/z2ui5_cl_app_demo_06.clas.abap
@@ -81,7 +81,7 @@ CLASS Z2UI5_CL_APP_DEMO_06 IMPLEMENTATION.
)->header_content(
)->link(
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( ).
page->simple_form( title = 'Form Title' editable = abap_true
diff --git a/src/00/z2ui5_cl_app_demo_07.clas.abap b/src/00/z2ui5_cl_app_demo_07.clas.abap
index 615bfd6d..6c9db1b3 100644
--- a/src/00/z2ui5_cl_app_demo_07.clas.abap
+++ b/src/00/z2ui5_cl_app_demo_07.clas.abap
@@ -169,7 +169,7 @@ CLASS z2ui5_cl_app_demo_07 IMPLEMENTATION.
)->header_content( ns = 'm'
)->toolbar_spacer( ns = 'm'
)->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( ).
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(
)->toolbar_spacer(
)->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( ).
page->zz_file_uploader(
diff --git a/src/00/z2ui5_cl_app_demo_08.clas.abap b/src/00/z2ui5_cl_app_demo_08.clas.abap
index 76b689f7..7765f545 100644
--- a/src/00/z2ui5_cl_app_demo_08.clas.abap
+++ b/src/00/z2ui5_cl_app_demo_08.clas.abap
@@ -60,7 +60,7 @@ CLASS Z2UI5_CL_APP_DEMO_08 IMPLEMENTATION.
)->header_content(
)->link(
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( ).
IF check_strip_active = abap_true.
diff --git a/src/00/z2ui5_cl_app_demo_09.clas.abap b/src/00/z2ui5_cl_app_demo_09.clas.abap
index f2bb7e97..e84818ae 100644
--- a/src/00/z2ui5_cl_app_demo_09.clas.abap
+++ b/src/00/z2ui5_cl_app_demo_09.clas.abap
@@ -218,7 +218,7 @@ CLASS Z2UI5_CL_APP_DEMO_09 IMPLEMENTATION.
href = 'https://twitter.com/OblomovDev/status/1637470531136921600'
)->link(
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( ).
DATA(form) = page->grid( 'L7 M7 S7'
diff --git a/src/00/z2ui5_cl_app_demo_10.clas.abap b/src/00/z2ui5_cl_app_demo_10.clas.abap
index 897241c9..bdc60ab7 100644
--- a/src/00/z2ui5_cl_app_demo_10.clas.abap
+++ b/src/00/z2ui5_cl_app_demo_10.clas.abap
@@ -35,7 +35,8 @@ CLASS Z2UI5_CL_APP_DEMO_10 IMPLEMENTATION.
href = 'https://twitter.com/OblomovDev'
)->link(
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(
)->overflow_toolbar(
diff --git a/src/00/z2ui5_cl_app_demo_11.clas.abap b/src/00/z2ui5_cl_app_demo_11.clas.abap
index 9f3d89da..1b7fbe26 100644
--- a/src/00/z2ui5_cl_app_demo_11.clas.abap
+++ b/src/00/z2ui5_cl_app_demo_11.clas.abap
@@ -71,7 +71,7 @@ CLASS Z2UI5_CL_APP_DEMO_11 IMPLEMENTATION.
href = 'https://twitter.com/OblomovDev/status/1630240894581608448'
)->link(
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( ).
DATA(tab) = page->table(
diff --git a/src/00/z2ui5_cl_app_demo_12.clas.abap b/src/00/z2ui5_cl_app_demo_12.clas.abap
index 2e269377..e11bfd4b 100644
--- a/src/00/z2ui5_cl_app_demo_12.clas.abap
+++ b/src/00/z2ui5_cl_app_demo_12.clas.abap
@@ -90,7 +90,7 @@ CLASS Z2UI5_CL_APP_DEMO_12 IMPLEMENTATION.
)->header_content(
)->link(
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( ).
DATA(grid) = page->grid( 'L7 M12 S12' )->content( 'l'
diff --git a/src/00/z2ui5_cl_app_demo_13.clas.abap b/src/00/z2ui5_cl_app_demo_13.clas.abap
index c80bae40..0a052058 100644
--- a/src/00/z2ui5_cl_app_demo_13.clas.abap
+++ b/src/00/z2ui5_cl_app_demo_13.clas.abap
@@ -170,7 +170,7 @@ CLASS Z2UI5_CL_APP_DEMO_13 IMPLEMENTATION.
href = `https://twitter.com/OblomovDev/status/1634206964291911682`
)->link(
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(
)->sub_header(
)->overflow_toolbar(
@@ -258,7 +258,7 @@ CLASS Z2UI5_CL_APP_DEMO_13 IMPLEMENTATION.
href = `https://twitter.com/OblomovDev/status/1634206964291911682`
)->link(
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(
)->sub_header(
)->overflow_toolbar(
@@ -322,7 +322,7 @@ CLASS Z2UI5_CL_APP_DEMO_13 IMPLEMENTATION.
href = `https://twitter.com/OblomovDev/status/1634206964291911682`
)->link(
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(
)->sub_header(
)->overflow_toolbar(
diff --git a/src/00/z2ui5_cl_app_demo_14.clas.abap b/src/00/z2ui5_cl_app_demo_14.clas.abap
index 1b38bfc2..22356ad0 100644
--- a/src/00/z2ui5_cl_app_demo_14.clas.abap
+++ b/src/00/z2ui5_cl_app_demo_14.clas.abap
@@ -57,7 +57,7 @@ CLASS Z2UI5_CL_APP_DEMO_14 IMPLEMENTATION.
shownavbutton = abap_true
)->header_content(
)->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( ).
DATA(grid) = page->grid( 'L7 M12 S12' )->content( 'l' ).
diff --git a/src/00/z2ui5_cl_app_demo_15.clas.abap b/src/00/z2ui5_cl_app_demo_15.clas.abap
index 38aa1cc6..4d3a2e47 100644
--- a/src/00/z2ui5_cl_app_demo_15.clas.abap
+++ b/src/00/z2ui5_cl_app_demo_15.clas.abap
@@ -40,7 +40,7 @@ CLASS Z2UI5_CL_APP_DEMO_15 IMPLEMENTATION.
shownavbutton = abap_true
)->header_content(
)->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(
)->vbox( 'sapUiSmallMargin'
)->link(
diff --git a/src/00/z2ui5_cl_app_demo_16.clas.abap b/src/00/z2ui5_cl_app_demo_16.clas.abap
index 264707d7..1ee09311 100644
--- a/src/00/z2ui5_cl_app_demo_16.clas.abap
+++ b/src/00/z2ui5_cl_app_demo_16.clas.abap
@@ -371,7 +371,7 @@ CLASS Z2UI5_CL_APP_DEMO_16 IMPLEMENTATION.
shownavbutton = abap_true
)->header_content(
)->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(
)->tab_container( ).
diff --git a/src/00/z2ui5_cl_app_demo_18.clas.abap b/src/00/z2ui5_cl_app_demo_18.clas.abap
index 69be17f9..941a50d8 100644
--- a/src/00/z2ui5_cl_app_demo_18.clas.abap
+++ b/src/00/z2ui5_cl_app_demo_18.clas.abap
@@ -132,7 +132,7 @@ CLASS z2ui5_cl_app_demo_18 IMPLEMENTATION.
)->header_content(
)->link(
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(
)->simple_form( title = 'VIEW_MAIN' editable = abap_true
)->content( 'form'
@@ -172,7 +172,7 @@ CLASS z2ui5_cl_app_demo_18 IMPLEMENTATION.
)->header_content(
)->link(
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(
)->simple_form( 'VIEW_SECOND'
)->content( 'form'
diff --git a/src/00/z2ui5_cl_app_demo_19.clas.abap b/src/00/z2ui5_cl_app_demo_19.clas.abap
index 432a8463..d68aee95 100644
--- a/src/00/z2ui5_cl_app_demo_19.clas.abap
+++ b/src/00/z2ui5_cl_app_demo_19.clas.abap
@@ -65,7 +65,7 @@ CLASS Z2UI5_CL_APP_DEMO_19 IMPLEMENTATION.
href = 'https://twitter.com/OblomovDev/status/1637852441671528448'
)->link(
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( ).
page->segmented_button(
diff --git a/src/00/z2ui5_cl_app_demo_21.clas.abap b/src/00/z2ui5_cl_app_demo_21.clas.abap
index 64b5722c..59bfe5d3 100644
--- a/src/00/z2ui5_cl_app_demo_21.clas.abap
+++ b/src/00/z2ui5_cl_app_demo_21.clas.abap
@@ -83,7 +83,7 @@ CLASS Z2UI5_CL_APP_DEMO_21 IMPLEMENTATION.
text = 'Demo'
href = 'https://twitter.com/OblomovDev/status/1637163852264624139'
)->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( ).
DATA(grid) = page->grid( 'L8 M12 S12' )->content( 'l' ).
diff --git a/src/00/z2ui5_cl_app_demo_22.clas.abap b/src/00/z2ui5_cl_app_demo_22.clas.abap
index f88aba6b..8d81a5de 100644
--- a/src/00/z2ui5_cl_app_demo_22.clas.abap
+++ b/src/00/z2ui5_cl_app_demo_22.clas.abap
@@ -108,7 +108,7 @@ CLASS Z2UI5_CL_APP_DEMO_22 IMPLEMENTATION.
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(
diff --git a/src/00/z2ui5_cl_app_demo_23.clas.abap b/src/00/z2ui5_cl_app_demo_23.clas.abap
index 4297ec20..31816911 100644
--- a/src/00/z2ui5_cl_app_demo_23.clas.abap
+++ b/src/00/z2ui5_cl_app_demo_23.clas.abap
@@ -7,9 +7,9 @@ CLASS z2ui5_cl_app_demo_23 DEFINITION PUBLIC.
DATA product TYPE string.
DATA quantity TYPE string.
+ data client type ref to z2ui5_if_client.
DATA:
BEGIN OF app,
- client TYPE REF TO z2ui5_if_client,
check_initialized TYPE abap_bool,
view_main TYPE string,
view_popup TYPE string,
@@ -33,7 +33,7 @@ CLASS Z2UI5_CL_APP_DEMO_23 IMPLEMENTATION.
METHOD z2ui5_if_app~controller.
- app-client = client.
+ me->client = client.
app-s_get = client->get( ).
" app-view_popup = ``.
@@ -61,7 +61,7 @@ CLASS Z2UI5_CL_APP_DEMO_23 IMPLEMENTATION.
CASE app-s_get-event.
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.
app-view_main = app-s_get-event.
@@ -105,15 +105,15 @@ CLASS Z2UI5_CL_APP_DEMO_23 IMPLEMENTATION.
` /> `.
@@ -123,27 +123,27 @@ CLASS Z2UI5_CL_APP_DEMO_23 IMPLEMENTATION.
app-s_next-xml_main = z2ui5_cl_xml_view_helper=>factory(
)->page(
title = 'abap2UI5 - NORMAL NORMAL NORMAL'
- navbuttonpress = app-client->_event( 'BACK' )
+ navbuttonpress = client->_event( 'BACK' )
shownavbutton = abap_true
)->header_content(
)->link(
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(
)->simple_form( 'Form Title'
)->content( 'form'
)->title( 'Input'
)->label( 'quantity'
- )->input( app-client->_bind( quantity )
+ )->input( client->_bind( quantity )
)->button(
text = 'NORMAL'
- press = app-client->_event( 'NORMAL' )
+ press = client->_event( 'NORMAL' )
)->button(
text = 'GENERIC'
- press = app-client->_event( 'GENERIC' )
+ press = client->_event( 'GENERIC' )
)->button(
text = 'XML'
- press = app-client->_event( 'XML' )
+ press = client->_event( 'XML' )
)->get_root( )->xml_get( ).
@@ -156,7 +156,7 @@ CLASS Z2UI5_CL_APP_DEMO_23 IMPLEMENTATION.
t_prop = VALUE #(
( n = `title` v = 'abap2UI5 - GENERIC GENERIC GENERIC' )
( n = `showNavButton` v = `true` )
- ( n = `navButtonPress` v = app-client->_event( 'BACK' ) )
+ ( n = `navButtonPress` v = client->_event( 'BACK' ) )
) )->_generic(
name = `SimpleForm`
ns = `form`
@@ -172,25 +172,25 @@ CLASS Z2UI5_CL_APP_DEMO_23 IMPLEMENTATION.
) )->get_parent( )->_generic(
name = `Input`
t_prop = VALUE #(
- ( n = `value` v = app-client->_bind( quantity ) )
+ ( n = `value` v = client->_bind( quantity ) )
) )->get_parent(
)->_generic(
name = `Button`
t_prop = VALUE #(
( n = `text` v = `NORMAL` )
- ( n = `press` v = app-client->_event( 'NORMAL' ) ) )
+ ( n = `press` v = client->_event( 'NORMAL' ) ) )
)->get_parent(
)->_generic(
name = `Button`
t_prop = VALUE #(
( n = `text` v = `GENERIC` )
- ( n = `press` v = app-client->_event( 'GENERIC' ) ) )
+ ( n = `press` v = client->_event( 'GENERIC' ) ) )
)->get_parent(
)->_generic(
name = `Button`
t_prop = VALUE #(
( 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( ).
diff --git a/src/00/z2ui5_cl_app_demo_24.clas.abap b/src/00/z2ui5_cl_app_demo_24.clas.abap
index b69eb8bf..4cbd6a25 100644
--- a/src/00/z2ui5_cl_app_demo_24.clas.abap
+++ b/src/00/z2ui5_cl_app_demo_24.clas.abap
@@ -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
)->header_content(
)->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(
)->grid( 'L6 M12 S12' )->content( 'l'
diff --git a/src/00/z2ui5_cl_app_demo_25.clas.abap b/src/00/z2ui5_cl_app_demo_25.clas.abap
index b6e36685..1f12b48e 100644
--- a/src/00/z2ui5_cl_app_demo_25.clas.abap
+++ b/src/00/z2ui5_cl_app_demo_25.clas.abap
@@ -71,7 +71,7 @@ CLASS z2ui5_cl_app_demo_25 IMPLEMENTATION.
navbuttonpress = client->_event( 'BACK' ) shownavbutton = abap_true
)->header_content(
)->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( ).
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
)->header_content(
)->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( ).
page->grid( 'L6 M12 S12' )->content( 'l'
diff --git a/src/00/z2ui5_cl_app_demo_26.clas.abap b/src/00/z2ui5_cl_app_demo_26.clas.abap
index 8f58a39b..6974062a 100644
--- a/src/00/z2ui5_cl_app_demo_26.clas.abap
+++ b/src/00/z2ui5_cl_app_demo_26.clas.abap
@@ -10,9 +10,9 @@ CLASS z2ui5_cl_app_demo_26 DEFINITION PUBLIC.
PROTECTED SECTION.
+ data client TYPE REF TO z2ui5_if_client.
DATA:
BEGIN OF app,
- client TYPE REF TO z2ui5_if_client,
check_initialized TYPE abap_bool,
view_main TYPE string,
view_popup TYPE string,
@@ -35,7 +35,7 @@ CLASS Z2UI5_CL_APP_DEMO_26 IMPLEMENTATION.
METHOD z2ui5_if_app~controller.
- app-client = client.
+ me->client = client.
app-s_get = client->get( ).
app-view_popup = ``.
@@ -77,15 +77,15 @@ CLASS Z2UI5_CL_APP_DEMO_26 IMPLEMENTATION.
app-s_next-popup_open_by_id = 'TEST'.
WHEN 'BUTTON_CONFIRM'.
- app-client->popup_message_toast( |confirm| ).
+ client->popup_message_toast( |confirm| ).
app-view_popup = ''.
WHEN 'BUTTON_CANCEL'.
- app-client->popup_message_toast( |cancel| ).
+ client->popup_message_toast( |cancel| ).
app-view_popup = ''.
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.
@@ -101,12 +101,12 @@ CLASS Z2UI5_CL_APP_DEMO_26 IMPLEMENTATION.
app-s_next-xml_main = z2ui5_cl_xml_view_helper=>factory(
)->page(
title = 'abap2UI5 - Popover Examples'
- navbuttonpress = app-client->_event( 'BACK' )
+ navbuttonpress = client->_event( 'BACK' )
shownavbutton = abap_true
)->header_content(
)->link(
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(
)->simple_form( 'Popover'
)->content( 'form'
@@ -114,7 +114,7 @@ CLASS Z2UI5_CL_APP_DEMO_26 IMPLEMENTATION.
)->label( 'Link'
)->link( text = 'Documentation UI5 Popover Control' href = 'https://openui5.hana.ondemand.com/entity/sap.m.Popover'
)->label( 'placement'
- )->segmented_button( app-client->_bind( mv_placement )
+ )->segmented_button( client->_bind( mv_placement )
)->items(
)->segmented_button_item(
key = 'Left'
@@ -136,14 +136,14 @@ CLASS Z2UI5_CL_APP_DEMO_26 IMPLEMENTATION.
)->label( 'popover'
)->button(
text = 'show'
- press = app-client->_event( 'POPOVER' )
+ press = client->_event( 'POPOVER' )
id = 'TEST'
)->button(
text = 'cancel'
- press = app-client->_event( 'POPOVER' )
+ press = client->_event( 'POPOVER' )
)->button(
text = 'post'
- press = app-client->_event( 'POPOVER' )
+ press = client->_event( 'POPOVER' )
)->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(
title = 'Popover Title'
placement = mv_placement
- " icon = 'sap-icon://edit'
)->footer( )->overflow_toolbar(
)->toolbar_spacer(
)->button(
text = 'Cancel'
- press = app-client->_event( 'BUTTON_CANCEL' )
+ press = client->_event( 'BUTTON_CANCEL' )
)->button(
text = 'Confirm'
- press = app-client->_event( 'BUTTON_CONFIRM' )
+ press = client->_event( 'BUTTON_CONFIRM' )
type = 'Emphasized'
)->get_parent( )->get_parent(
)->text( 'make an input here:'
diff --git a/src/00/z2ui5_cl_app_demo_27.clas.abap b/src/00/z2ui5_cl_app_demo_27.clas.abap
index 203ff1f1..9b614195 100644
--- a/src/00/z2ui5_cl_app_demo_27.clas.abap
+++ b/src/00/z2ui5_cl_app_demo_27.clas.abap
@@ -15,9 +15,9 @@ CLASS z2ui5_cl_app_demo_27 DEFINITION PUBLIC.
DATA input52 TYPE string.
PROTECTED SECTION.
+ data client TYPE REF TO z2ui5_if_client.
DATA:
BEGIN OF app,
- client TYPE REF TO z2ui5_if_client,
check_initialized TYPE abap_bool,
view_main TYPE string,
view_popup TYPE string,
@@ -39,7 +39,7 @@ CLASS Z2UI5_CL_APP_DEMO_27 IMPLEMENTATION.
METHOD z2ui5_if_app~controller.
- app-client = client.
+ me->client = client.
app-s_get = client->get( ).
app-view_popup = ``.
@@ -66,19 +66,19 @@ CLASS Z2UI5_CL_APP_DEMO_27 IMPLEMENTATION.
CASE app-s_get-event.
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'.
WHEN 'BUTTON_CONFIRM'.
- app-client->popup_message_toast( |confirm| ).
+ client->popup_message_toast( |confirm| ).
app-view_popup = ''.
WHEN 'BUTTON_CANCEL'.
- app-client->popup_message_toast( |cancel| ).
+ client->popup_message_toast( |cancel| ).
app-view_popup = ''.
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.
@@ -101,12 +101,12 @@ CLASS Z2UI5_CL_APP_DEMO_27 IMPLEMENTATION.
app-s_next-xml_main = z2ui5_cl_xml_view_helper=>factory(
)->page(
title = 'abap2UI5 - Binding Syntax'
- navbuttonpress = app-client->_event( 'BACK' )
+ navbuttonpress = client->_event( 'BACK' )
shownavbutton = abap_true
)->header_content(
)->link(
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(
)->simple_form( title = 'Binding Syntax' editable = abap_true
)->content( 'form'
@@ -117,43 +117,43 @@ CLASS Z2UI5_CL_APP_DEMO_27 IMPLEMENTATION.
text = 'Expression Binding'
href = 'https://sapui5.hana.ondemand.com/sdk/#/topic/daf6852a04b44d118963968a1239d2c0'
)->label( 'input in uppercase'
- )->input( app-client->_bind( input2 )
+ )->input( client->_bind( input2 )
)->input(
- value = '{= $' && app-client->_bind( input2 ) && '.toUpperCase() }'
+ value = '{= $' && client->_bind( input2 ) && '.toUpperCase() }'
enabled = abap_false
)->label( 'max value of the first two inputs'
)->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| &&
- ' path:"' && app-client->_bind( val = input32 path = abap_true ) && '" }'
+ ' path:"' && client->_bind( val = input32 path = abap_true ) && '" }'
)->input(
- value = '{= Math.max($' && app-client->_bind( input31 ) &&', $' && app-client->_bind( input32 ) && ') }'
+ value = '{= Math.max($' && client->_bind( input31 ) &&', $' && client->_bind( input32 ) && ') }'
enabled = abap_false
)->label( 'only enabled when the quantity equals 500'
)->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(
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.'
- )->input( app-client->_bind( val = input41 )
+ )->input( client->_bind( val = input41 )
)->button(
text = 'VIP'
- enabled = '{= RegExp(''vip'', ''i'').test($' && app-client->_bind( input41 ) && ') }'
+ enabled = '{= RegExp(''vip'', ''i'').test($' && client->_bind( input41 ) && ') }'
)->label( 'concatenate both inputs'
- )->input( app-client->_bind( val = input51 )
- )->input( app-client->_bind( val = input52 )
+ )->input( client->_bind( val = input51 )
+ )->input( client->_bind( val = input52 )
)->input(
value = '{ parts: [' && |\n| &&
- ' "' && app-client->_bind( val = input51 path = abap_true ) && '",' && |\n| &&
- ' "' && app-client->_bind( val = input52 path = abap_true ) && '"' && |\n| &&
+ ' "' && client->_bind( val = input51 path = abap_true ) && '",' && |\n| &&
+ ' "' && client->_bind( val = input52 path = abap_true ) && '"' && |\n| &&
' ] }'
enabled = abap_false
diff --git a/src/00/z2ui5_cl_xml_view_helper.clas.abap b/src/00/z2ui5_cl_xml_view_helper.clas.abap
index b07ac9ce..735bcec4 100644
--- a/src/00/z2ui5_cl_xml_view_helper.clas.abap
+++ b/src/00/z2ui5_cl_xml_view_helper.clas.abap
@@ -12,8 +12,8 @@ CLASS z2ui5_cl_xml_view_helper DEFINITION
END OF ty_s_name_value.
TYPES ty_t_name_value TYPE STANDARD TABLE OF ty_s_name_value WITH EMPTY KEY.
- DATA m_name TYPE string.
- DATA m_ns TYPE string.
+ DATA m_name TYPE string.
+ DATA m_ns TYPE string.
DATA mt_prop TYPE ty_t_name_value.
DATA m_root TYPE REF TO z2ui5_cl_xml_view_helper.
@@ -27,6 +27,13 @@ CLASS z2ui5_cl_xml_view_helper DEFINITION
RETURNING
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
IMPORTING
ns TYPE string_table OPTIONAL.
@@ -2054,10 +2061,12 @@ CLASS z2ui5_cl_xml_view_helper IMPLEMENTATION.
METHOD title.
+ data(lv_name) = COND #( WHEN ns = 'f' THEN 'title' ELSE `Title` ).
+
result = me.
_generic(
ns = ns
- name = COND #( WHEN ns = 'f' THEN 'title' ELSE `Title` )
+ name = lv_name
t_prop = VALUE #(
( n = `text` v = text )
( n = `wrapping` v = _=>get_json_boolean( wrapping ) )
@@ -2283,10 +2292,21 @@ CLASS z2ui5_cl_xml_view_helper IMPLEMENTATION.
METHOD shell.
- result = _generic(
- name = `Shell`
- ns = ns
- ).
+ result = _generic(
+ name = `Shell`
+ 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.
diff --git a/src/00/z2ui5_cl_xml_view_helper.clas.locals_imp.abap b/src/00/z2ui5_cl_xml_view_helper.clas.locals_imp.abap
index 59cccfd7..e0e6a787 100644
--- a/src/00/z2ui5_cl_xml_view_helper.clas.locals_imp.abap
+++ b/src/00/z2ui5_cl_xml_view_helper.clas.locals_imp.abap
@@ -14,6 +14,12 @@ CLASS z2ui5_lcl_utility DEFINITION INHERITING FROM cx_no_check.
RETURNING
VALUE(result) TYPE abap_bool.
+ CLASS-METHODS get_classname_by_ref
+ IMPORTING
+ in TYPE REF TO object
+ RETURNING
+ VALUE(result) TYPE string.
+
PROTECTED SECTION.
PRIVATE SECTION.
@@ -21,7 +27,12 @@ ENDCLASS.
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.
diff --git a/src/z2ui5_cl_http_handler.clas.abap b/src/z2ui5_cl_http_handler.clas.abap
index 27212845..972ab1cb 100644
--- a/src/z2ui5_cl_http_handler.clas.abap
+++ b/src/z2ui5_cl_http_handler.clas.abap
@@ -74,9 +74,9 @@ CLASS z2ui5_cl_http_handler IMPLEMENTATION.
( name = to_upper( row-name ) value = to_upper( row-value ) ) ).
DATA(lv_url) = client-t_header[ name = '~path' ]-value.
+
TRY.
DATA(lv_app) = client-t_param[ name = 'APP' ]-value.
- lv_url = lv_url && `?app=` && lv_app.
CATCH cx_root.
ENDTRY.
@@ -105,13 +105,11 @@ CLASS z2ui5_cl_http_handler IMPLEMENTATION.
- r_result = r_result && `` && |\n| &&
- |\n| &&
`