File tree Expand file tree Collapse file tree 3 files changed +113
-0
lines changed Expand file tree Collapse file tree 3 files changed +113
-0
lines changed Original file line number Diff line number Diff line change @@ -1124,6 +1124,14 @@ class = 'sapUiTinyMarginEnd sapUiTinyMarginBottom'
11241124 class = 'sapUiTinyMarginEnd sapUiTinyMarginBottom'
11251125 ).
11261126
1127+ panel->generic_tile(
1128+ header = 'Popup Display HTML'
1129+ subheader = ''
1130+ press = client->_event( 'z2ui5_cl_demo_app_149' )
1131+ mode = 'LineMode'
1132+ class = 'sapUiTinyMarginEnd sapUiTinyMarginBottom'
1133+ ).
1134+
11271135 page = page2->panel(
11281136 expandable = abap_true
11291137 expanded = client->_bind_edit( ms_check_expanded-version )
Original file line number Diff line number Diff line change 1+ CLASS z2ui5_cl_demo_app_149 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_149 IMPLEMENTATION .
20+
21+
22+ METHOD ui5_event .
23+
24+ CASE client->get( )-event.
25+
26+ WHEN 'POPUP' .
27+ DATA (lo_app ) = z2ui5_cl_popup_html=>factory( `<h2>HTML Links</h2>` && | \n| &&
28+ `<p>HTML links are defined with the a tag:</p>` && | \n| &&
29+ | \n| &&
30+ `<a href="https://www.w3schools.com">This is a link</a>` ).
31+ client->nav_app_call( lo_app ).
32+
33+ WHEN 'BACK' .
34+ client->nav_app_leave( client->get_app( client->get( )-s_draft-id_prev_app_stack ) ).
35+
36+ ENDCASE .
37+
38+ ENDMETHOD .
39+
40+
41+ METHOD ui5_display .
42+
43+ DATA (view ) = z2ui5_cl_xml_view=>factory( ).
44+ view->shell(
45+ )->page(
46+ title = 'abap2UI5 - Popup HTML'
47+ navbuttonpress = client->_event( val = 'BACK' )
48+ shownavbutton = xsdbool ( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL )
49+ )->header_content(
50+ )->link(
51+ text = 'Source_Code'
52+ target = '_blank'
53+
54+ )->get_parent(
55+ )->button(
56+ text = 'Open Popup...'
57+ press = client->_event( 'POPUP' ) ).
58+
59+ client->view_display( view->stringify( ) ).
60+
61+ ENDMETHOD .
62+
63+
64+ METHOD z2ui5_if_app ~main .
65+
66+ me ->client = client .
67+
68+ IF client->get( )-check_on_navigated = abap_true .
69+ ui5_display( ).
70+ ui5_callback( ).
71+ RETURN .
72+ ENDIF .
73+
74+ ui5_event( ).
75+
76+ ENDMETHOD .
77+
78+ METHOD ui5_callback .
79+
80+ TRY .
81+ DATA (lo_prev ) = client->get_app( client->get( )-s_draft-id_prev_app ).
82+ DATA (lo_dummy ) = CAST z2ui5_cl_popup_to_inform( lo_prev ).
83+ client->message_box_display( `callback after popup to inform` ).
84+ CATCH cx_root.
85+ ENDTRY .
86+
87+ ENDMETHOD .
88+
89+ ENDCLASS .
Original file line number Diff line number Diff line change 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_149</CLSNAME >
7+ <LANGU >E</LANGU >
8+ <DESCRIPT >popup - popup_html</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 >
You can’t perform that action at this time.
0 commit comments