Skip to content

Commit 6eb66b8

Browse files
authored
model samples (#202)
* model samples * update info cc with device info
1 parent b5f79d3 commit 6eb66b8

3 files changed

+83
-70
lines changed

src/z2ui5_cl_demo_app_000.clas.abap

+74-67
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@
2424
PROTECTED SECTION.
2525
PRIVATE SECTION.
2626

27-
ENDCLASS.
27+
ENDCLASS.
2828

2929

3030

31-
CLASS Z2UI5_CL_DEMO_APP_000 IMPLEMENTATION.
31+
CLASS z2ui5_cl_demo_app_000 IMPLEMENTATION.
3232

3333

3434
METHOD z2ui5_if_app~main.
@@ -151,13 +151,13 @@ CLASS Z2UI5_CL_DEMO_APP_000 IMPLEMENTATION.
151151
mode = 'LineMode'
152152
class = 'sapUiTinyMarginEnd sapUiTinyMarginBottom' ).
153153

154-
panel->generic_tile(
155-
header = 'Event IV'
156-
subheader = `Facet Filter - T_arg with Objects`
157-
press = client->_event( 'Z2UI5_CL_DEMO_APP_197' )
158-
mode = 'LineMode'
159-
class = 'sapUiTinyMarginEnd sapUiTinyMarginBottom'
160-
).
154+
panel->generic_tile(
155+
header = 'Event IV'
156+
subheader = `Facet Filter - T_arg with Objects`
157+
press = client->_event( 'Z2UI5_CL_DEMO_APP_197' )
158+
mode = 'LineMode'
159+
class = 'sapUiTinyMarginEnd sapUiTinyMarginBottom'
160+
).
161161

162162
panel->generic_tile(
163163
header = 'Follow Up Action'
@@ -183,13 +183,13 @@ CLASS Z2UI5_CL_DEMO_APP_000 IMPLEMENTATION.
183183
class = 'sapUiTinyMarginEnd sapUiTinyMarginBottom'
184184
).
185185

186-
panel->generic_tile(
187-
header = 'Timer II'
188-
subheader = 'Set Loading Indicator while Server Request'
189-
press = client->_event( 'Z2UI5_CL_DEMO_APP_064' )
190-
mode = 'LineMode'
191-
class = 'sapUiTinyMarginEnd sapUiTinyMarginBottom'
192-
).
186+
panel->generic_tile(
187+
header = 'Timer II'
188+
subheader = 'Set Loading Indicator while Server Request'
189+
press = client->_event( 'Z2UI5_CL_DEMO_APP_064' )
190+
mode = 'LineMode'
191+
class = 'sapUiTinyMarginEnd sapUiTinyMarginBottom'
192+
).
193193

194194
panel->generic_tile(
195195
header = 'New Tab'
@@ -453,12 +453,12 @@ CLASS Z2UI5_CL_DEMO_APP_000 IMPLEMENTATION.
453453
class = 'sapUiTinyMarginEnd sapUiTinyMarginBottom'
454454
).
455455

456-
panel->generic_tile(
457-
header = 'Column Menu'
458-
press = client->_event( 'z2ui5_cl_demo_app_183' )
459-
mode = 'LineMode'
460-
class = 'sapUiTinyMarginEnd sapUiTinyMarginBottom'
461-
).
456+
panel->generic_tile(
457+
header = 'Column Menu'
458+
press = client->_event( 'z2ui5_cl_demo_app_183' )
459+
mode = 'LineMode'
460+
class = 'sapUiTinyMarginEnd sapUiTinyMarginBottom'
461+
).
462462

463463
panel->generic_tile(
464464
header = 'ui.Table I'
@@ -835,7 +835,7 @@ CLASS Z2UI5_CL_DEMO_APP_000 IMPLEMENTATION.
835835

836836

837837
panel->generic_tile(
838-
header = 'Dynamic Objects'
838+
header = 'Dynamic Objects I'
839839
subheader = 'Use S-RTTI to render different Subapps'
840840
press = client->_event( 'Z2UI5_CL_DEMO_APP_131' )
841841
mode = 'LineMode'
@@ -850,37 +850,14 @@ CLASS Z2UI5_CL_DEMO_APP_000 IMPLEMENTATION.
850850
class = 'sapUiTinyMarginEnd sapUiTinyMarginBottom'
851851
).
852852

853-
panel->generic_tile(
854-
header = 'Dynamic Objects III'
855-
subheader = 'User Generic Data Refs in Subapps'
856-
press = client->_event( 'Z2UI5_CL_DEMO_APP_185' )
857-
mode = 'LineMode'
858-
class = 'sapUiTinyMarginEnd sapUiTinyMarginBottom'
859-
).
860-
861-
panel->generic_tile(
862-
header = 'Dynamic Objects IV'
863-
subheader = 'User Generic Tab Refs in Subapps'
864-
press = client->_event( 'Z2UI5_CL_DEMO_APP_191' )
865-
mode = 'LineMode'
866-
class = 'sapUiTinyMarginEnd sapUiTinyMarginBottom'
867-
).
868-
869-
panel->generic_tile(
870-
header = 'Dynamic Objects V'
871-
subheader = 'User Generic Struc Refs'
872-
press = client->_event( 'Z2UI5_CL_DEMO_APP_195' )
873-
mode = 'LineMode'
874-
class = 'sapUiTinyMarginEnd sapUiTinyMarginBottom'
875-
).
853+
panel->generic_tile(
854+
header = 'Dynamic Objects III'
855+
subheader = 'User Generic Data Refs in Subapps'
856+
press = client->_event( 'Z2UI5_CL_DEMO_APP_185' )
857+
mode = 'LineMode'
858+
class = 'sapUiTinyMarginEnd sapUiTinyMarginBottom'
859+
).
876860

877-
panel->generic_tile(
878-
header = 'Dynamic Objects VI'
879-
subheader = 'User Generic Struc Refs with refresh'
880-
press = client->_event( 'Z2UI5_CL_DEMO_APP_199' )
881-
mode = 'LineMode'
882-
class = 'sapUiTinyMarginEnd sapUiTinyMarginBottom'
883-
).
884861

885862

886863
panel = page->panel(
@@ -1360,20 +1337,20 @@ CLASS Z2UI5_CL_DEMO_APP_000 IMPLEMENTATION.
13601337
class = 'sapUiTinyMarginEnd sapUiTinyMarginBottom'
13611338
).
13621339

1363-
panel->generic_tile(
1364-
header = 'Network Graph'
1365-
press = client->_event( 'z2ui5_cl_demo_app_182' )
1366-
mode = 'LineMode'
1367-
class = 'sapUiTinyMarginEnd sapUiTinyMarginBottom'
1368-
).
1340+
panel->generic_tile(
1341+
header = 'Network Graph'
1342+
press = client->_event( 'z2ui5_cl_demo_app_182' )
1343+
mode = 'LineMode'
1344+
class = 'sapUiTinyMarginEnd sapUiTinyMarginBottom'
1345+
).
13691346

1370-
panel->generic_tile(
1371-
header = 'Status Indicator Library'
1372-
subheader = ``
1373-
press = client->_event( 'Z2UI5_CL_DEMO_APP_196' )
1374-
mode = 'LineMode'
1375-
class = 'sapUiTinyMarginEnd sapUiTinyMarginBottom'
1376-
).
1347+
panel->generic_tile(
1348+
header = 'Status Indicator Library'
1349+
subheader = ``
1350+
press = client->_event( 'Z2UI5_CL_DEMO_APP_196' )
1351+
mode = 'LineMode'
1352+
class = 'sapUiTinyMarginEnd sapUiTinyMarginBottom'
1353+
).
13771354

13781355
panel = page->panel(
13791356
expandable = abap_false
@@ -1472,6 +1449,36 @@ CLASS Z2UI5_CL_DEMO_APP_000 IMPLEMENTATION.
14721449
class = 'sapUiTinyMarginEnd sapUiTinyMarginBottom'
14731450
).
14741451

1452+
panel = page->panel(
1453+
expandable = abap_false
1454+
expanded = abap_true
1455+
headertext = `For Testing only...`
1456+
).
1457+
1458+
panel->generic_tile(
1459+
header = 'Model I'
1460+
subheader = 'RTTI Data'
1461+
press = client->_event( 'Z2UI5_CL_DEMO_APP_191' )
1462+
mode = 'LineMode'
1463+
class = 'sapUiTinyMarginEnd sapUiTinyMarginBottom'
1464+
).
1465+
1466+
panel->generic_tile(
1467+
header = 'Model I'
1468+
subheader = 'RTTI Data'
1469+
press = client->_event( 'Z2UI5_CL_DEMO_APP_195' )
1470+
mode = 'LineMode'
1471+
class = 'sapUiTinyMarginEnd sapUiTinyMarginBottom'
1472+
).
1473+
1474+
panel->generic_tile(
1475+
header = 'Model II'
1476+
subheader = 'RTTI Data'
1477+
press = client->_event( 'Z2UI5_CL_DEMO_APP_199' )
1478+
mode = 'LineMode'
1479+
class = 'sapUiTinyMarginEnd sapUiTinyMarginBottom'
1480+
).
1481+
14751482
panel = page->panel(
14761483
expandable = abap_false
14771484
expanded = abap_true
@@ -1490,4 +1497,4 @@ CLASS Z2UI5_CL_DEMO_APP_000 IMPLEMENTATION.
14901497
client->view_display( page->stringify( ) ).
14911498

14921499
ENDMETHOD.
1493-
ENDCLASS.
1500+
ENDCLASS.

src/z2ui5_cl_demo_app_122.clas.abap

+5-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ CLASS z2ui5_cl_demo_app_122 DEFINITION
1212
DATA device_systemtype TYPE string.
1313
DATA device_os TYPE string.
1414
DATA device_browser TYPE string.
15-
DATA check_initialized TYPE abap_bool .
15+
DATA check_initialized TYPE abap_bool.
16+
DATA device_system_desktop TYPE abap_bool.
1617

1718
PROTECTED SECTION.
1819
DATA client TYPE REF TO z2ui5_if_client.
@@ -47,6 +48,7 @@ CLASS z2ui5_cl_demo_app_122 IMPLEMENTATION.
4748
ui5_gav = client->_bind_edit( ui5_gav )
4849
ui5_theme = client->_bind_edit( ui5_theme )
4950
ui5_version = client->_bind_edit( ui5_version )
51+
device_system_desktop = client->_bind_edit( device_system_desktop )
5052
)->simple_form( title = 'Information' editable = abap_true
5153
)->content( 'form'
5254
)->label( 'device_browser'
@@ -61,6 +63,8 @@ CLASS z2ui5_cl_demo_app_122 IMPLEMENTATION.
6163
)->input( client->_bind_edit( ui5_theme )
6264
)->label( `ui5_version`
6365
)->input( client->_bind_edit( ui5_version )
66+
)->label( `device_system_desktop`
67+
)->input( client->_bind_edit( device_system_desktop )
6468
)->stringify( ) ).
6569

6670
ENDMETHOD.

src/z2ui5_cl_demo_app_199.clas.abap

+4-2
Original file line numberDiff line numberDiff line change
@@ -96,12 +96,14 @@ CLASS z2ui5_cl_demo_app_199 IMPLEMENTATION.
9696
on_init( ).
9797
ENDIF.
9898

99-
IF mv_counter <> lines( mt_table->* ) AND mv_counter IS NOT INITIAL.
99+
FIELD-SYMBOLS <tab> TYPE STANDARD TABLE.
100+
ASSIGN mt_table->* TO <tab>.
101+
IF mv_counter <> lines( <tab> ) AND mv_counter IS NOT INITIAL.
100102
client->message_box_display( text = 'Frontend Lines <> Backend!' type = 'error' ).
101103
ENDIF.
102104

103105
on_event( ).
104-
mv_counter = lines( mt_table->* ).
106+
mv_counter = lines( <tab> ).
105107

106108
ENDMETHOD.
107109

0 commit comments

Comments
 (0)