Skip to content

Commit 0caa553

Browse files
committed
popup demos
1 parent e89c30e commit 0caa553

7 files changed

+359
-8
lines changed

src/z2ui5_cl_demo_app_000.clas.abap

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ CLASS z2ui5_cl_demo_app_000 IMPLEMENTATION.
8282
page = page->panel(
8383
expandable = abap_true
8484
expanded = client->_bind_edit( ms_check_expanded-basics )
85-
headertext = `Basics - Input, Output & Popups` ).
85+
headertext = `General, Output, Input, Selection Screen` ).
8686

8787
DATA(panel) = page->panel(
8888
expandable = abap_false
@@ -233,10 +233,9 @@ CLASS z2ui5_cl_demo_app_000 IMPLEMENTATION.
233233
panel = page->panel(
234234
expandable = abap_false
235235
expanded = abap_true
236-
headertext = 'Input Handling'
236+
headertext = 'Input'
237237
).
238238

239-
240239
panel->generic_tile(
241240
header = 'Data Types'
242241
subheader = 'Use of Integer, Decimals, Dates & Time'
@@ -356,7 +355,6 @@ CLASS z2ui5_cl_demo_app_000 IMPLEMENTATION.
356355
class = 'sapUiTinyMarginEnd sapUiTinyMarginBottom'
357356
).
358357

359-
360358
panel->generic_tile(
361359
header = 'Select-Options'
362360
subheader = 'Use multi inputs to create range tables'
@@ -379,11 +377,10 @@ CLASS z2ui5_cl_demo_app_000 IMPLEMENTATION.
379377
class = 'sapUiTinyMarginEnd sapUiTinyMarginBottom'
380378
).
381379

382-
383380
page = page2->panel(
384381
expandable = abap_true
385382
expanded = client->_bind_edit( ms_check_expanded-popups )
386-
headertext = `Popup & Popvers` ).
383+
headertext = `Popup, Popvers` ).
387384

388385
panel = page->panel(
389386
expandable = abap_false
@@ -434,6 +431,27 @@ CLASS z2ui5_cl_demo_app_000 IMPLEMENTATION.
434431
class = 'sapUiTinyMarginEnd sapUiTinyMarginBottom'
435432
).
436433

434+
panel->generic_tile(
435+
header = 'Popup Input Value'
436+
press = client->_event( 'Z2UI5_CL_DEMO_APP_156' )
437+
mode = 'LineMode'
438+
class = 'sapUiTinyMarginEnd sapUiTinyMarginBottom'
439+
).
440+
441+
panel->generic_tile(
442+
header = 'Popup File Upload'
443+
press = client->_event( 'Z2UI5_CL_DEMO_APP_157' )
444+
mode = 'LineMode'
445+
class = 'sapUiTinyMarginEnd sapUiTinyMarginBottom'
446+
).
447+
448+
panel->generic_tile(
449+
header = 'Popup Display PDF'
450+
press = client->_event( 'Z2UI5_CL_DEMO_APP_158' )
451+
mode = 'LineMode'
452+
class = 'sapUiTinyMarginEnd sapUiTinyMarginBottom'
453+
).
454+
437455
panel = page->panel(
438456
expandable = abap_false
439457
expanded = abap_true
@@ -456,7 +474,6 @@ CLASS z2ui5_cl_demo_app_000 IMPLEMENTATION.
456474
class = 'sapUiTinyMarginEnd sapUiTinyMarginBottom'
457475
).
458476

459-
460477
panel->generic_tile(
461478
header = 'Popover with List'
462479
subheader = 'List to select in Popover'
@@ -484,7 +501,7 @@ CLASS z2ui5_cl_demo_app_000 IMPLEMENTATION.
484501
page = page2->panel(
485502
expandable = abap_true
486503
expanded = client->_bind_edit( ms_check_expanded-more )
487-
headertext = `More - Tables, Visualization & Layouts`
504+
headertext = `Tables, Visualization, Layouts`
488505
).
489506

490507
panel = page->panel(
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
CLASS z2ui5_cl_demo_app_156 DEFINITION PUBLIC.
2+
3+
PUBLIC SECTION.
4+
5+
INTERFACES z2ui5_if_app.
6+
7+
DATA client TYPE REF TO z2ui5_if_client.
8+
9+
METHODS ui5_display.
10+
METHODS ui5_event.
11+
METHODS ui5_callback.
12+
13+
PROTECTED SECTION.
14+
PRIVATE SECTION.
15+
ENDCLASS.
16+
17+
18+
19+
CLASS Z2UI5_CL_DEMO_APP_156 IMPLEMENTATION.
20+
21+
22+
METHOD ui5_callback.
23+
24+
TRY.
25+
DATA(lo_prev) = client->get_app( client->get( )-s_draft-id_prev_app ).
26+
DATA(lv_text) = CAST z2ui5_cl_popup_input_value( lo_prev )->result( )-value.
27+
client->message_box_display( `the input is ` && lv_text ).
28+
CATCH cx_root.
29+
ENDTRY.
30+
31+
ENDMETHOD.
32+
33+
34+
METHOD ui5_display.
35+
36+
DATA(view) = z2ui5_cl_xml_view=>factory( ).
37+
view->shell(
38+
)->page(
39+
title = 'abap2UI5 - Popup Input Value'
40+
navbuttonpress = client->_event( val = 'BACK' check_view_destroy = abap_true )
41+
shownavbutton = abap_true
42+
)->header_content(
43+
)->link(
44+
text = 'Source_Code'
45+
target = '_blank'
46+
href = z2ui5_cl_demo_utility=>factory( client )->app_get_url_source_code( )
47+
)->get_parent(
48+
)->button(
49+
text = 'Open Popup...'
50+
press = client->_event( 'POPUP' ) ).
51+
52+
client->view_display( view->stringify( ) ).
53+
54+
ENDMETHOD.
55+
56+
57+
METHOD ui5_event.
58+
59+
CASE client->get( )-event.
60+
61+
WHEN 'POPUP'.
62+
DATA(lo_app) = z2ui5_cl_popup_input_value=>factory( text = `Amount of products:` ).
63+
client->nav_app_call( lo_app ).
64+
65+
WHEN 'BACK'.
66+
client->nav_app_leave( client->get_app( client->get( )-s_draft-id_prev_app_stack ) ).
67+
68+
ENDCASE.
69+
70+
ENDMETHOD.
71+
72+
73+
METHOD z2ui5_if_app~main.
74+
75+
me->client = client.
76+
77+
IF client->get( )-check_on_navigated = abap_true.
78+
ui5_display( ).
79+
ui5_callback( ).
80+
RETURN.
81+
ENDIF.
82+
83+
ui5_event( ).
84+
85+
ENDMETHOD.
86+
ENDCLASS.

src/z2ui5_cl_demo_app_156.clas.xml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<abapGit version="v1.0.0" serializer="LCL_OBJECT_CLAS" serializer_version="v1.0.0">
3+
<asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
4+
<asx:values>
5+
<VSEOCLASS>
6+
<CLSNAME>Z2UI5_CL_DEMO_APP_156</CLSNAME>
7+
<LANGU>E</LANGU>
8+
<DESCRIPT>popup - popup_input_value</DESCRIPT>
9+
<STATE>1</STATE>
10+
<CLSCCINCL>X</CLSCCINCL>
11+
<FIXPT>X</FIXPT>
12+
<UNICODE>X</UNICODE>
13+
</VSEOCLASS>
14+
</asx:values>
15+
</asx:abap>
16+
</abapGit>
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
CLASS z2ui5_cl_demo_app_157 DEFINITION PUBLIC.
2+
3+
PUBLIC SECTION.
4+
5+
INTERFACES z2ui5_if_app.
6+
7+
DATA client TYPE REF TO z2ui5_if_client.
8+
9+
METHODS ui5_display.
10+
METHODS ui5_event.
11+
METHODS ui5_callback.
12+
13+
PROTECTED SECTION.
14+
PRIVATE SECTION.
15+
ENDCLASS.
16+
17+
18+
19+
CLASS Z2UI5_CL_DEMO_APP_157 IMPLEMENTATION.
20+
21+
22+
METHOD ui5_callback.
23+
24+
TRY.
25+
DATA(lo_prev) = client->get_app( client->get( )-s_draft-id_prev_app ).
26+
DATA(lv_text) = CAST z2ui5_cl_popup_file_upload( lo_prev )->result( )-text.
27+
client->message_box_display( `the input is ` && lv_text ).
28+
CATCH cx_root.
29+
ENDTRY.
30+
31+
ENDMETHOD.
32+
33+
34+
METHOD ui5_display.
35+
36+
DATA(view) = z2ui5_cl_xml_view=>factory( ).
37+
view->shell(
38+
)->page(
39+
title = 'abap2UI5 - Popup File Upload'
40+
navbuttonpress = client->_event( val = 'BACK' check_view_destroy = abap_true )
41+
shownavbutton = abap_true
42+
)->header_content(
43+
)->link(
44+
text = 'Source_Code'
45+
target = '_blank'
46+
href = z2ui5_cl_demo_utility=>factory( client )->app_get_url_source_code( )
47+
)->get_parent(
48+
)->button(
49+
text = 'Open Popup...'
50+
press = client->_event( 'POPUP' ) ).
51+
52+
client->view_display( view->stringify( ) ).
53+
54+
ENDMETHOD.
55+
56+
57+
METHOD ui5_event.
58+
59+
CASE client->get( )-event.
60+
61+
WHEN 'POPUP'.
62+
DATA(lo_app) = z2ui5_cl_popup_file_upload=>factory( ).
63+
client->nav_app_call( lo_app ).
64+
65+
WHEN 'BACK'.
66+
client->nav_app_leave( client->get_app( client->get( )-s_draft-id_prev_app_stack ) ).
67+
68+
ENDCASE.
69+
70+
ENDMETHOD.
71+
72+
73+
METHOD z2ui5_if_app~main.
74+
75+
me->client = client.
76+
77+
IF client->get( )-check_on_navigated = abap_true.
78+
ui5_display( ).
79+
ui5_callback( ).
80+
RETURN.
81+
ENDIF.
82+
83+
ui5_event( ).
84+
85+
ENDMETHOD.
86+
ENDCLASS.

src/z2ui5_cl_demo_app_157.clas.xml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<abapGit version="v1.0.0" serializer="LCL_OBJECT_CLAS" serializer_version="v1.0.0">
3+
<asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
4+
<asx:values>
5+
<VSEOCLASS>
6+
<CLSNAME>Z2UI5_CL_DEMO_APP_157</CLSNAME>
7+
<LANGU>E</LANGU>
8+
<DESCRIPT>popup - popup_file_upload</DESCRIPT>
9+
<STATE>1</STATE>
10+
<CLSCCINCL>X</CLSCCINCL>
11+
<FIXPT>X</FIXPT>
12+
<UNICODE>X</UNICODE>
13+
</VSEOCLASS>
14+
</asx:values>
15+
</asx:abap>
16+
</abapGit>

0 commit comments

Comments
 (0)