From 9fe77d95556cefd70da65510cf65bb2a56bd8e84 Mon Sep 17 00:00:00 2001
From: oblomov <102328295+oblomov-dev@users.noreply.github.com>
Date: Tue, 11 Apr 2023 09:24:04 +0200
Subject: [PATCH] bugfixes (#154)
* Update package.devc.xml
* added timer
* bugfixes
---
src/00/package.devc.xml | 2 +-
src/00/z2ui5_cl_app_demo_00.clas.abap | 8 +--
src/00/z2ui5_cl_app_demo_01.clas.abap | 1 +
src/00/z2ui5_cl_app_demo_02.clas.abap | 4 +-
src/00/z2ui5_cl_app_demo_03.clas.abap | 2 +-
src/00/z2ui5_cl_app_demo_05.clas.abap | 2 +-
src/00/z2ui5_cl_app_demo_06.clas.abap | 2 +-
src/00/z2ui5_cl_app_demo_07.clas.abap | 4 +-
src/00/z2ui5_cl_app_demo_08.clas.abap | 2 +-
src/00/z2ui5_cl_app_demo_09.clas.abap | 4 +-
src/00/z2ui5_cl_app_demo_10.clas.abap | 4 +-
src/00/z2ui5_cl_app_demo_11.clas.abap | 4 +-
src/00/z2ui5_cl_app_demo_12.clas.abap | 2 +-
src/00/z2ui5_cl_app_demo_13.clas.abap | 4 +-
src/00/z2ui5_cl_app_demo_14.clas.abap | 4 +-
src/00/z2ui5_cl_app_demo_15.clas.abap | 2 +-
src/00/z2ui5_cl_app_demo_16.clas.abap | 12 ++---
src/00/z2ui5_cl_app_demo_18.clas.abap | 4 +-
src/00/z2ui5_cl_app_demo_19.clas.abap | 4 +-
src/00/z2ui5_cl_app_demo_21.clas.abap | 4 +-
src/00/z2ui5_cl_app_demo_22.clas.abap | 2 +-
src/00/z2ui5_cl_app_demo_24.clas.abap | 4 +-
src/00/z2ui5_cl_app_demo_25.clas.abap | 4 +-
src/00/z2ui5_cl_app_demo_26.clas.abap | 2 +-
src/00/z2ui5_cl_app_demo_27.clas.abap | 2 +-
src/00/z2ui5_cl_app_demo_28.clas.abap | 54 +++++++++++++------
src/z2ui5_cl_http_handler.clas.abap | 14 +++--
...z2ui5_cl_http_handler.clas.locals_imp.abap | 16 ++++--
src/z2ui5_if_client.intf.abap | 4 ++
29 files changed, 108 insertions(+), 69 deletions(-)
diff --git a/src/00/package.devc.xml b/src/00/package.devc.xml
index f9f9caa8..51904546 100644
--- a/src/00/package.devc.xml
+++ b/src/00/package.devc.xml
@@ -3,7 +3,7 @@
- abap2UI5 - apps and demos
+ abap2UI5 - demos and view helper
diff --git a/src/00/z2ui5_cl_app_demo_00.clas.abap b/src/00/z2ui5_cl_app_demo_00.clas.abap
index 3c2f7f74..3831b8a3 100644
--- a/src/00/z2ui5_cl_app_demo_00.clas.abap
+++ b/src/00/z2ui5_cl_app_demo_00.clas.abap
@@ -91,10 +91,10 @@ CLASS z2ui5_cl_app_demo_00 IMPLEMENTATION.
)->button( text = 'Import UI5-XML-View' press = client->_event( 'z2ui5_cl_app_demo_31' )
)->button( text = 'HTML, JS, CSS' press = client->_event( 'z2ui5_cl_app_demo_29' )
).
-*
-* grid->simple_form( title = 'HowTo - Messages' layout = 'ResponsiveGridLayout' )->content( 'f'
-* )->button( text = 'Messages (Toast, Box, Strip)' press = client->_event( 'z2ui5_cl_app_demo_08' )
-* ).
+
+ grid->simple_form( title = 'HowTo - Messages' layout = 'ResponsiveGridLayout' )->content( 'form'
+ )->button( text = 'Messages (Toast, Box, Strip)' press = client->_event( 'z2ui5_cl_app_demo_08' )
+ ).
DATA(form) = page->grid( 'L9 M12 S12'
)->content( 'l'
diff --git a/src/00/z2ui5_cl_app_demo_01.clas.abap b/src/00/z2ui5_cl_app_demo_01.clas.abap
index ca393831..9fe5a3dd 100644
--- a/src/00/z2ui5_cl_app_demo_01.clas.abap
+++ b/src/00/z2ui5_cl_app_demo_01.clas.abap
@@ -41,6 +41,7 @@ CLASS z2ui5_cl_app_demo_01 IMPLEMENTATION.
)->link(
text = 'Source_Code'
href = z2ui5_cl_xml_view_helper=>hlp_get_source_code_url( app = me get = client->get( ) )
+ target = '_blank'
)->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 1e5bbffb..cca04720 100644
--- a/src/00/z2ui5_cl_app_demo_02.clas.abap
+++ b/src/00/z2ui5_cl_app_demo_02.clas.abap
@@ -115,8 +115,8 @@ CLASS Z2UI5_CL_APP_DEMO_02 IMPLEMENTATION.
navbuttonpress = client->_event( 'BACK' )
shownavbutton = abap_true
)->header_content(
- )->link( text = 'Demo' href = `https://twitter.com/OblomovDev/status/1628701535222865922`
- )->link( text = 'Source_Code' href = z2ui5_cl_xml_view_helper=>hlp_get_source_code_url( app = me get = client->get( ) )
+ )->link( text = 'Demo' target = '_blank' href = `https://twitter.com/OblomovDev/status/1628701535222865922`
+ )->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( '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 93c5364a..f2d540cb 100644
--- a/src/00/z2ui5_cl_app_demo_03.clas.abap
+++ b/src/00/z2ui5_cl_app_demo_03.clas.abap
@@ -54,7 +54,7 @@ CLASS Z2UI5_CL_APP_DEMO_03 IMPLEMENTATION.
shownavbutton = abap_true
)->header_content(
)->link(
- text = 'Source_Code'
+ text = 'Source_Code' target = '_blank'
href = z2ui5_cl_xml_view_helper=>hlp_get_source_code_url( app = me get = client->get( ) )
)->get_parent( ).
diff --git a/src/00/z2ui5_cl_app_demo_05.clas.abap b/src/00/z2ui5_cl_app_demo_05.clas.abap
index c3a4b4b4..a5eb4379 100644
--- a/src/00/z2ui5_cl_app_demo_05.clas.abap
+++ b/src/00/z2ui5_cl_app_demo_05.clas.abap
@@ -98,7 +98,7 @@ CLASS Z2UI5_CL_APP_DEMO_05 IMPLEMENTATION.
shownavbutton = abap_true
)->header_content(
)->link(
- text = 'Source_Code'
+ text = 'Source_Code' target = '_blank'
href = z2ui5_cl_xml_view_helper=>hlp_get_source_code_url( app = me get = client->get( ) )
)->get_parent( ).
diff --git a/src/00/z2ui5_cl_app_demo_06.clas.abap b/src/00/z2ui5_cl_app_demo_06.clas.abap
index d3b81714..49c9c6c1 100644
--- a/src/00/z2ui5_cl_app_demo_06.clas.abap
+++ b/src/00/z2ui5_cl_app_demo_06.clas.abap
@@ -80,7 +80,7 @@ CLASS Z2UI5_CL_APP_DEMO_06 IMPLEMENTATION.
shownavbutton = abap_true
)->header_content(
)->link(
- text = 'Source_Code'
+ text = 'Source_Code' target = '_blank'
href = z2ui5_cl_xml_view_helper=>hlp_get_source_code_url( app = me get = client->get( ) )
)->get_parent( ).
diff --git a/src/00/z2ui5_cl_app_demo_07.clas.abap b/src/00/z2ui5_cl_app_demo_07.clas.abap
index 610dc070..ab174afd 100644
--- a/src/00/z2ui5_cl_app_demo_07.clas.abap
+++ b/src/00/z2ui5_cl_app_demo_07.clas.abap
@@ -168,8 +168,8 @@ CLASS z2ui5_cl_app_demo_07 IMPLEMENTATION.
shownavbutton = abap_true
)->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 = z2ui5_cl_xml_view_helper=>hlp_get_source_code_url( app = me get = client->get( ) )
+ )->link( ns = 'm' text = 'Demo' target = '_blank' href = 'https://twitter.com/OblomovDev/status/1638487600930357248'
+ )->link( ns = 'm' target = '_blank' 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.'
diff --git a/src/00/z2ui5_cl_app_demo_08.clas.abap b/src/00/z2ui5_cl_app_demo_08.clas.abap
index 37c79f08..d151cbc0 100644
--- a/src/00/z2ui5_cl_app_demo_08.clas.abap
+++ b/src/00/z2ui5_cl_app_demo_08.clas.abap
@@ -59,7 +59,7 @@ CLASS Z2UI5_CL_APP_DEMO_08 IMPLEMENTATION.
shownavbutton = abap_true
)->header_content(
)->link(
- text = 'Source_Code'
+ text = 'Source_Code' target = '_blank'
href = z2ui5_cl_xml_view_helper=>hlp_get_source_code_url( app = me get = client->get( ) )
)->get_parent( ).
diff --git a/src/00/z2ui5_cl_app_demo_09.clas.abap b/src/00/z2ui5_cl_app_demo_09.clas.abap
index e84818ae..b7f08bde 100644
--- a/src/00/z2ui5_cl_app_demo_09.clas.abap
+++ b/src/00/z2ui5_cl_app_demo_09.clas.abap
@@ -214,10 +214,10 @@ CLASS Z2UI5_CL_APP_DEMO_09 IMPLEMENTATION.
shownavbutton = abap_true
)->header_content(
)->link(
- text = 'Demo'
+ text = 'Demo' target = '_blank'
href = 'https://twitter.com/OblomovDev/status/1637470531136921600'
)->link(
- text = 'Source_Code'
+ text = 'Source_Code' target = '_blank'
href = z2ui5_cl_xml_view_helper=>hlp_get_source_code_url( app = me get = client->get( ) )
)->get_parent( ).
diff --git a/src/00/z2ui5_cl_app_demo_10.clas.abap b/src/00/z2ui5_cl_app_demo_10.clas.abap
index bdc60ab7..1c67c2d3 100644
--- a/src/00/z2ui5_cl_app_demo_10.clas.abap
+++ b/src/00/z2ui5_cl_app_demo_10.clas.abap
@@ -31,10 +31,10 @@ CLASS Z2UI5_CL_APP_DEMO_10 IMPLEMENTATION.
)->button( text = 'button'
)->text( 'text'
)->link(
- text = 'link'
+ text = 'link' target = '_blank'
href = 'https://twitter.com/OblomovDev'
)->link(
- text = 'Source_Code'
+ text = 'Source_Code' target = '_blank'
href = z2ui5_cl_xml_view_helper=>hlp_get_source_code_url( app = me get = client->get( ) )
).
diff --git a/src/00/z2ui5_cl_app_demo_11.clas.abap b/src/00/z2ui5_cl_app_demo_11.clas.abap
index 1b7fbe26..e8cf165c 100644
--- a/src/00/z2ui5_cl_app_demo_11.clas.abap
+++ b/src/00/z2ui5_cl_app_demo_11.clas.abap
@@ -67,10 +67,10 @@ CLASS Z2UI5_CL_APP_DEMO_11 IMPLEMENTATION.
shownavbutton = abap_true
)->header_content(
)->link(
- text = 'Demo'
+ text = 'Demo' target = '_blank'
href = 'https://twitter.com/OblomovDev/status/1630240894581608448'
)->link(
- text = 'Source_Code'
+ text = 'Source_Code' target = '_blank'
href = z2ui5_cl_xml_view_helper=>hlp_get_source_code_url( app = me get = client->get( ) )
)->get_parent( ).
diff --git a/src/00/z2ui5_cl_app_demo_12.clas.abap b/src/00/z2ui5_cl_app_demo_12.clas.abap
index e11bfd4b..7b7587f3 100644
--- a/src/00/z2ui5_cl_app_demo_12.clas.abap
+++ b/src/00/z2ui5_cl_app_demo_12.clas.abap
@@ -89,7 +89,7 @@ CLASS Z2UI5_CL_APP_DEMO_12 IMPLEMENTATION.
shownavbutton = abap_true
)->header_content(
)->link(
- text = 'Source_Code'
+ text = 'Source_Code' target = '_blank'
href = z2ui5_cl_xml_view_helper=>hlp_get_source_code_url( app = me get = client->get( ) )
)->get_parent( ).
diff --git a/src/00/z2ui5_cl_app_demo_13.clas.abap b/src/00/z2ui5_cl_app_demo_13.clas.abap
index 73fa6ded..300850b9 100644
--- a/src/00/z2ui5_cl_app_demo_13.clas.abap
+++ b/src/00/z2ui5_cl_app_demo_13.clas.abap
@@ -166,10 +166,10 @@ CLASS Z2UI5_CL_APP_DEMO_13 IMPLEMENTATION.
shownavbutton = abap_true
)->header_content(
)->link(
- text = 'Demo'
+ text = 'Demo' target = '_blank'
href = `https://twitter.com/OblomovDev/status/1634206964291911682`
)->link(
- text = 'Source_Code'
+ text = 'Source_Code' target = '_blank'
href = z2ui5_cl_xml_view_helper=>hlp_get_source_code_url( app = me get = client->get( ) )
)->get_parent(
)->sub_header(
diff --git a/src/00/z2ui5_cl_app_demo_14.clas.abap b/src/00/z2ui5_cl_app_demo_14.clas.abap
index d79f569d..ed5985b7 100644
--- a/src/00/z2ui5_cl_app_demo_14.clas.abap
+++ b/src/00/z2ui5_cl_app_demo_14.clas.abap
@@ -56,8 +56,8 @@ CLASS Z2UI5_CL_APP_DEMO_14 IMPLEMENTATION.
navbuttonpress = client->_event( 'BACK' )
shownavbutton = abap_true
)->header_content(
- )->link( text = 'Demo' href = 'https://twitter.com/OblomovDev/status/1631562906570575875'
- )->link( text = 'Source_Code' href = z2ui5_cl_xml_view_helper=>hlp_get_source_code_url( app = me get = client->get( ) )
+ )->link( text = 'Demo' target = '_blank' href = 'https://twitter.com/OblomovDev/status/1631562906570575875'
+ )->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' ).
diff --git a/src/00/z2ui5_cl_app_demo_15.clas.abap b/src/00/z2ui5_cl_app_demo_15.clas.abap
index 3e49febe..b4cc527c 100644
--- a/src/00/z2ui5_cl_app_demo_15.clas.abap
+++ b/src/00/z2ui5_cl_app_demo_15.clas.abap
@@ -41,7 +41,7 @@ CLASS Z2UI5_CL_APP_DEMO_15 IMPLEMENTATION.
shownavbutton = abap_true
)->header_content(
)->toolbar_spacer(
- )->link( text = 'Source_Code' href = z2ui5_cl_xml_view_helper=>hlp_get_source_code_url( app = me get = client->get( ) )
+ )->link( text = 'Source_Code' target = '_blank' 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 fced0008..4bce4687 100644
--- a/src/00/z2ui5_cl_app_demo_16.clas.abap
+++ b/src/00/z2ui5_cl_app_demo_16.clas.abap
@@ -66,7 +66,7 @@ CLASS Z2UI5_CL_APP_DEMO_16 IMPLEMENTATION.
)->grid( 'XL6 L6 M6 S12' ).
grid->link(
- text = 'Go to the SAP Demos for Interactive bar Charts here...'
+ text = 'Go to the SAP Demos for Interactive bar Charts here...' target = '_blank'
href = 'https://sapui5.hana.ondemand.com/#/entity/sap.suite.ui.microchart.InteractiveBarChart/sample/sap.suite.ui.microchart.sample.InteractiveBarChart'
)->text(
text = 'Absolute and Percentage value'
@@ -131,7 +131,7 @@ CLASS Z2UI5_CL_APP_DEMO_16 IMPLEMENTATION.
)->grid( 'XL6 L6 M6 S12' ).
grid->link(
- text = 'Go to the SAP Demos for Interactive Donut Charts here...'
+ text = 'Go to the SAP Demos for Interactive Donut Charts here...' target = '_blank'
href = 'https://sapui5.hana.ondemand.com/#/entity/sap.suite.ui.microchart.InteractiveDonutChart/sample/sap.suite.ui.microchart.sample.InteractiveDonutChart'
)->text(
text = 'Three segments'
@@ -203,7 +203,7 @@ CLASS Z2UI5_CL_APP_DEMO_16 IMPLEMENTATION.
DATA(grid) = tab->grid( 'XL6 L6 M6 S12' ).
grid->link(
- text = 'Go to the SAP Demos for Interactive Line Charts here...'
+ text = 'Go to the SAP Demos for Interactive Line Charts here...' target = '_blank'
href = 'https://sapui5.hana.ondemand.com/#/entity/sap.suite.ui.microchart.InteractiveLineChart/sample/sap.suite.ui.microchart.sample.InteractiveLineChart' ).
grid->text(
@@ -283,7 +283,7 @@ CLASS Z2UI5_CL_APP_DEMO_16 IMPLEMENTATION.
)->grid( 'XL12 L12 M12 S12' ).
grid->link(
- text = 'Go to the SAP Demos for Radial Charts here...'
+ text = 'Go to the SAP Demos for Radial Charts here...' target = '_blank'
href = 'https://sapui5.hana.ondemand.com/#/entity/sap.suite.ui.microchart.RadialMicroChart/sample/sap.suite.ui.microchart.sample.RadialMicroChart' ).
grid->vertical_layout(
@@ -370,8 +370,8 @@ CLASS Z2UI5_CL_APP_DEMO_16 IMPLEMENTATION.
navbuttonpress = client->_event( 'BACK' )
shownavbutton = abap_true
)->header_content(
- )->link( text = 'Demo' href = `https://twitter.com/OblomovDev/status/1639191954285113344`
- )->link( text = 'Source_Code' href = z2ui5_cl_xml_view_helper=>hlp_get_source_code_url( app = me get = client->get( ) )
+ )->link( text = 'Demo' target = '_blank' href = `https://twitter.com/OblomovDev/status/1639191954285113344`
+ )->link( text = 'Source_Code' target = '_blank' 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 f88bd86a..070c9987 100644
--- a/src/00/z2ui5_cl_app_demo_18.clas.abap
+++ b/src/00/z2ui5_cl_app_demo_18.clas.abap
@@ -80,7 +80,7 @@ CLASS z2ui5_cl_app_demo_18 IMPLEMENTATION.
"set the data for the frontend
client->set_next( app-next ).
- "the app is serialized and persisted, we delete all data which is not needed in the future before
+ "the app will be serialized and persisted, we delete all data which is not needed in the future before
CLEAR app-get.
CLEAR app-next.
@@ -131,7 +131,7 @@ CLASS z2ui5_cl_app_demo_18 IMPLEMENTATION.
shownavbutton = abap_true
)->header_content(
)->link(
- text = 'Source_Code'
+ text = 'Source_Code' target = '_blank'
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
diff --git a/src/00/z2ui5_cl_app_demo_19.clas.abap b/src/00/z2ui5_cl_app_demo_19.clas.abap
index d68aee95..18d73540 100644
--- a/src/00/z2ui5_cl_app_demo_19.clas.abap
+++ b/src/00/z2ui5_cl_app_demo_19.clas.abap
@@ -61,10 +61,10 @@ CLASS Z2UI5_CL_APP_DEMO_19 IMPLEMENTATION.
shownavbutton = abap_true
)->header_content(
)->link(
- text = 'Demo'
+ text = 'Demo' target = '_blank'
href = 'https://twitter.com/OblomovDev/status/1637852441671528448'
)->link(
- text = 'Source_Code'
+ text = 'Source_Code' target = '_blank'
href = z2ui5_cl_xml_view_helper=>hlp_get_source_code_url( app = me get = client->get( ) )
)->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 59bfe5d3..efb9ff07 100644
--- a/src/00/z2ui5_cl_app_demo_21.clas.abap
+++ b/src/00/z2ui5_cl_app_demo_21.clas.abap
@@ -80,10 +80,10 @@ CLASS Z2UI5_CL_APP_DEMO_21 IMPLEMENTATION.
shownavbutton = abap_true
)->header_content(
)->link(
- text = 'Demo'
+ text = 'Demo' target = '_blank'
href = 'https://twitter.com/OblomovDev/status/1637163852264624139'
)->link(
- text = 'Source_Code' href = z2ui5_cl_xml_view_helper=>hlp_get_source_code_url( app = me get = client->get( ) )
+ 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' ).
diff --git a/src/00/z2ui5_cl_app_demo_22.clas.abap b/src/00/z2ui5_cl_app_demo_22.clas.abap
index 8d81a5de..e26ae4df 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 = z2ui5_cl_xml_view_helper=>hlp_get_source_code_url( app = me get = client->get( ) ) ).
+ page->header_content( )->link( text = 'Source_Code' target = '_blank' 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_24.clas.abap b/src/00/z2ui5_cl_app_demo_24.clas.abap
index 4cbd6a25..38a2a954 100644
--- a/src/00/z2ui5_cl_app_demo_24.clas.abap
+++ b/src/00/z2ui5_cl_app_demo_24.clas.abap
@@ -56,8 +56,8 @@ CLASS z2ui5_cl_app_demo_24 IMPLEMENTATION.
DATA(view) = z2ui5_cl_xml_view_helper=>factory(
)->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 = z2ui5_cl_xml_view_helper=>hlp_get_source_code_url( app = me get = client->get( ) )
+ )->link( text = 'Demo' target = '_blank' href = `https://twitter.com/OblomovDev/status/1640743794206228480`
+ )->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'
diff --git a/src/00/z2ui5_cl_app_demo_25.clas.abap b/src/00/z2ui5_cl_app_demo_25.clas.abap
index 1f12b48e..6914793b 100644
--- a/src/00/z2ui5_cl_app_demo_25.clas.abap
+++ b/src/00/z2ui5_cl_app_demo_25.clas.abap
@@ -70,8 +70,8 @@ CLASS z2ui5_cl_app_demo_25 IMPLEMENTATION.
title = 'abap2UI5 - flow logic - APP 02'
navbuttonpress = client->_event( 'BACK' ) shownavbutton = abap_true
)->header_content(
- )->link( text = 'Demo' href = `https://twitter.com/OblomovDev/status/1640743794206228480`
- )->link( text = 'Source_Code' href = z2ui5_cl_xml_view_helper=>hlp_get_source_code_url( app = me get = client->get( ) )
+ )->link( text = 'Demo' target = '_blank' href = `https://twitter.com/OblomovDev/status/1640743794206228480`
+ )->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'
diff --git a/src/00/z2ui5_cl_app_demo_26.clas.abap b/src/00/z2ui5_cl_app_demo_26.clas.abap
index 6974062a..a438a5c5 100644
--- a/src/00/z2ui5_cl_app_demo_26.clas.abap
+++ b/src/00/z2ui5_cl_app_demo_26.clas.abap
@@ -105,7 +105,7 @@ CLASS Z2UI5_CL_APP_DEMO_26 IMPLEMENTATION.
shownavbutton = abap_true
)->header_content(
)->link(
- text = 'Source_Code'
+ text = 'Source_Code' target = '_blank'
href = z2ui5_cl_xml_view_helper=>hlp_get_source_code_url( app = me get = client->get( ) )
)->get_parent(
)->simple_form( 'Popover'
diff --git a/src/00/z2ui5_cl_app_demo_27.clas.abap b/src/00/z2ui5_cl_app_demo_27.clas.abap
index 9b614195..8066804b 100644
--- a/src/00/z2ui5_cl_app_demo_27.clas.abap
+++ b/src/00/z2ui5_cl_app_demo_27.clas.abap
@@ -105,7 +105,7 @@ CLASS Z2UI5_CL_APP_DEMO_27 IMPLEMENTATION.
shownavbutton = abap_true
)->header_content(
)->link(
- text = 'Source_Code'
+ text = 'Source_Code' target = '_blank'
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
diff --git a/src/00/z2ui5_cl_app_demo_28.clas.abap b/src/00/z2ui5_cl_app_demo_28.clas.abap
index 555965b7..2e25f875 100644
--- a/src/00/z2ui5_cl_app_demo_28.clas.abap
+++ b/src/00/z2ui5_cl_app_demo_28.clas.abap
@@ -22,8 +22,8 @@ CLASS z2ui5_cl_app_demo_28 DEFINITION PUBLIC.
check_initialized TYPE abap_bool,
view_main TYPE string,
view_popup TYPE string,
- s_get TYPE z2ui5_if_client=>ty_s_get,
- s_next TYPE z2ui5_if_client=>ty_s_next,
+ get TYPE z2ui5_if_client=>ty_s_get,
+ next TYPE z2ui5_if_client=>ty_s_next,
END OF app.
METHODS z2ui5_on_init.
@@ -41,7 +41,7 @@ CLASS z2ui5_cl_app_demo_28 IMPLEMENTATION.
METHOD z2ui5_if_app~controller.
me->client = client.
- app-s_get = client->get( ).
+ app-get = client->get( ).
app-view_popup = ``.
IF app-check_initialized = abap_false.
@@ -49,22 +49,22 @@ CLASS z2ui5_cl_app_demo_28 IMPLEMENTATION.
z2ui5_on_init( ).
ENDIF.
- IF app-s_get-event IS NOT INITIAL.
+ IF app-get-event IS NOT INITIAL.
z2ui5_on_event( ).
ENDIF.
z2ui5_on_render( ).
- client->set_next( app-s_next ).
- CLEAR app-s_get.
- CLEAR app-s_next.
+ client->set_next( app-next ).
+ CLEAR app-get.
+ CLEAR app-next.
ENDMETHOD.
METHOD z2ui5_on_event.
- CASE app-s_get-event.
+ CASE app-get-event.
WHEN 'BUTTON_POST'.
* client->popup_message_toast( |{ product } { quantity } - send to the server| ).
@@ -74,12 +74,31 @@ CLASS z2ui5_cl_app_demo_28 IMPLEMENTATION.
client->popup_message_toast( |confirm| ).
app-view_popup = ''.
+ WHEN 'TIMER_FINISHED'.
+
+ FIELD-SYMBOLS TYPE STANDARD TABLE.
+
+ " OF z2ui5_t_draft.
+ ASSIGN mt_draft->* TO .
+
+ SELECT FROM z2ui5_t_draft
+ FIELDS *
+ ORDER BY uuid
+ INTO TABLE @DATA(lt_data)
+ UP TO 2 ROWS
+ .
+ APPEND LINES OF lt_data TO .
+ "!"mt_draft->* = CORRESPONDING #( lt_data ).
+ "!
+ app-next-s_timer-interval_ms = '2000'.
+ app-next-s_timer-event_finished = 'TIMER_FINISHED'.
+
WHEN 'BUTTON_CANCEL'.
client->popup_message_toast( |cancel| ).
app-view_popup = ''.
WHEN 'BACK'.
- client->nav_app_leave( client->get_app( app-s_get-id_prev_app_stack ) ).
+ client->nav_app_leave( client->get_app( app-get-id_prev_app_stack ) ).
ENDCASE.
@@ -105,13 +124,16 @@ CLASS z2ui5_cl_app_demo_28 IMPLEMENTATION.
SELECT FROM z2ui5_t_draft
FIELDS uuid, uuid_prev
- order by uuid
+ ORDER BY uuid
INTO TABLE @DATA(lt_data)
UP TO 10 ROWS
.
mt_draft->* = CORRESPONDING #( lt_data ).
+ app-next-s_timer-interval_ms = '2000'.
+ app-next-s_timer-event_finished = 'TIMER_FINISHED'.
+
ENDMETHOD.
@@ -123,7 +145,7 @@ CLASS z2ui5_cl_app_demo_28 IMPLEMENTATION.
shownavbutton = abap_true
)->header_content(
)->link(
- text = 'Source_Code'
+ text = 'Source_Code' target = '_blank'
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
@@ -138,10 +160,10 @@ CLASS z2ui5_cl_app_demo_28 IMPLEMENTATION.
press = client->_event( 'BUTTON_POST' )
).
- data(tab) = lo_view->get_parent( )->get_parent( )->simple_form( title = 'Table' editable = abap_true
- )->content( 'form' )->table(
- items = client->_bind( val = mt_draft->* check_gen_data = abap_true )
- ).
+ DATA(tab) = lo_view->get_parent( )->get_parent( )->simple_form( title = 'Table' editable = abap_true
+ )->content( 'form' )->table(
+ items = client->_bind( val = mt_draft->* check_gen_data = abap_true )
+ ).
tab->columns(
)->column(
@@ -155,7 +177,7 @@ CLASS z2ui5_cl_app_demo_28 IMPLEMENTATION.
)->input( '{UUID_PREV}'
).
- app-s_next-xml_main = lo_view->get_root( )->xml_get( ).
+ app-next-xml_main = lo_view->get_root( )->xml_get( ).
ENDMETHOD.
diff --git a/src/z2ui5_cl_http_handler.clas.abap b/src/z2ui5_cl_http_handler.clas.abap
index bf5a9701..993bd63e 100644
--- a/src/z2ui5_cl_http_handler.clas.abap
+++ b/src/z2ui5_cl_http_handler.clas.abap
@@ -143,6 +143,11 @@ CLASS z2ui5_cl_http_handler IMPLEMENTATION.
` sap.ui.core.BusyIndicator.hide();` && |\n| &&
` }.bind(this));` && |\n| &&
` }` && |\n| &&
+ ` if (sap.z2ui5.oResponse.oTimer){ ` && |\n| &&
+ ` var oEvent = { 'EVENT' : 'BUTTON_CHECK', 'METHOD' : 'UPDATE' };` && |\n| &&
+ ` oEvent.EVENT = sap.z2ui5.oResponse.oTimer.eventFinished;` && |\n| &&
+ ` setTimeout( sap.z2ui5.oView.getController().onEvent, sap.z2ui5.oResponse.oTimer.intervalMs, oEvent );` && |\n| &&
+ ` }` && |\n| &&
` sap.ui.core.BusyIndicator.hide();` && |\n| &&
` },` && |\n| &&
|\n| &&
@@ -176,7 +181,7 @@ CLASS z2ui5_cl_http_handler IMPLEMENTATION.
` }` && |\n| &&
` sap.z2ui5.oResponse.oViewPopup.destroy();` && |\n| &&
` } else {` && |\n| &&
- ` this.oBody.oUpdate = this.oView.getModel().oData.oUpdate;` && |\n| &&
+ ` this.oBody.oUpdate = sap.z2ui5.oView.getModel().oData.oUpdate;` && |\n| &&
` }` && |\n| &&
|\n| &&
` this.oBody.oSystem = sap.z2ui5.oResponse.oSystem;` && |\n| &&
@@ -190,8 +195,9 @@ CLASS z2ui5_cl_http_handler IMPLEMENTATION.
|\n| &&
` sap.z2ui5.oResponseOld = sap.z2ui5.oResponse;` && |\n| &&
` sap.z2ui5.oResponse = {};` && |\n| &&
- ` this.oView.destroy();` && |\n| &&
- ` this.Roundtrip();` && |\n| &&
+ ` sap.z2ui5.oBody = this.oBody;` && |\n| &&
+ ` sap.z2ui5.oView.getController( ).Roundtrip();` && |\n| &&
+ ` sap.z2ui5.oView.destroy();` && |\n| &&
` },` && |\n| &&
|\n| &&
` Roundtrip: function () {` && |\n| &&
@@ -251,7 +257,7 @@ CLASS z2ui5_cl_http_handler IMPLEMENTATION.
` });` && |\n| &&
` }` && |\n| &&
` }.bind(this);` && |\n| &&
- ` xhr.send(JSON.stringify(this.oBody));` && |\n| &&
+ ` xhr.send(JSON.stringify(sap.z2ui5.oBody));` && |\n| &&
` },` && |\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 9346b586..5494985d 100644
--- a/src/z2ui5_cl_http_handler.clas.locals_imp.abap
+++ b/src/z2ui5_cl_http_handler.clas.locals_imp.abap
@@ -1460,6 +1460,12 @@ CLASS z2ui5_lcl_system_runtime IMPLEMENTATION.
)->add_attribute( n = `selectionStart` v = ms_next-s_set-s_cursor_pos-selectionstart apos_active = abap_false ).
ENDIF.
+ IF ms_next-s_set-s_timer IS NOT INITIAL.
+ lo_ui5_model->add_attribute_object( `oTimer`
+ )->add_attribute( n = `eventFinished` v = ms_next-s_set-s_timer-event_finished
+ )->add_attribute( n = `intervalMs` v = ms_next-s_set-s_timer-interval_ms apos_active = abap_false ).
+ ENDIF.
+
IF ms_next-s_set-check_set_prev_view = abap_true.
lo_ui5_model->add_attribute( n = `SET_PREV_VIEW` v = `true` apos_active = abap_false ).
ENDIF.
@@ -1509,7 +1515,7 @@ CLASS z2ui5_lcl_system_runtime IMPLEMENTATION.
WHEN cl_abap_datadescr=>kind_elem.
CREATE DATA TYPE (lr_attri->gen_type).
lv_value = lo_model->get_attribute( lr_attri->name )->get_val( ).
- assign ->* to FIELD-SYMBOL().
+ ASSIGN ->* TO FIELD-SYMBOL().
= lv_value.
WHEN cl_abap_datadescr=>kind_table.
DATA(lo_struc) = cl_abap_structdescr=>describe_by_name( lr_attri->gen_type ).
@@ -1519,7 +1525,7 @@ CLASS z2ui5_lcl_system_runtime IMPLEMENTATION.
p_unique = abap_false
).
CREATE DATA TYPE HANDLE lo_tab.
- assign ->* to .
+ ASSIGN ->* TO .
_=>trans_ref_tab_2_tab(
EXPORTING ir_tab_from = lo_model->get_attribute( lr_attri->name )->mr_actual
CHANGING ct_to = ).
@@ -1633,9 +1639,9 @@ CLASS z2ui5_lcl_system_runtime IMPLEMENTATION.
IF check_gen_data = abap_true.
TRY.
- " DATA(lo_refdescr) = CAST cl_abap_refdescr( cl_abap_datadescr=>describe_by_data( lr_ref2->* ) ).
- " DATA lr_ref TYPE REF TO data.
- data(lr_ref) = cast data( lr_ref2->* ).
+ " DATA(lo_refdescr) = CAST cl_abap_refdescr( cl_abap_datadescr=>describe_by_data( lr_ref2->* ) ).
+ " DATA lr_ref TYPE REF TO data.
+ DATA(lr_ref) = CAST data( lr_ref2->* ).
IF lr_attri->gen_type IS INITIAL.
DATA(lo_datadescr) = cl_abap_datadescr=>describe_by_data( lr_ref->* ).
lr_attri->gen_type_kind = lo_datadescr->type_kind.
diff --git a/src/z2ui5_if_client.intf.abap b/src/z2ui5_if_client.intf.abap
index 7095f2dd..723a762d 100644
--- a/src/z2ui5_if_client.intf.abap
+++ b/src/z2ui5_if_client.intf.abap
@@ -33,6 +33,10 @@ INTERFACE z2ui5_if_client
selectionstart TYPE string,
selectionend TYPE string,
END OF s_cursor_pos,
+ begin of s_timer,
+ interval_ms type string,
+ event_finished type string,
+ end of s_timer,
END OF ty_s_next.
METHODS set_next