File tree Expand file tree Collapse file tree 3 files changed +215
-126
lines changed Expand file tree Collapse file tree 3 files changed +215
-126
lines changed Original file line number Diff line number Diff line change 1+ class Z2UI5_CL_DEMO_APP_173 definition
2+ public
3+ create public .
4+
5+ public section .
6+
7+ interfaces IF_SERIALIZABLE_OBJECT .
8+ interfaces Z2UI5_IF_APP .
9+
10+ types : begin of ty_s_data,
11+ name type string ,
12+ END OF ty_s_data,
13+ ty_t_data type STANDARD TABLE OF ty_s_data with EMPTY KEY .
14+
15+ DATA mt_data type ty_t_data.
16+
17+ data CLIENT type ref to Z2UI5_IF_CLIENT .
18+
19+
20+
21+ PROTECTED SECTION .
22+ PRIVATE SECTION .
23+ METHODS render_main.
24+ ENDCLASS .
25+
26+
27+
28+ CLASS Z2UI5_CL_DEMO_APP_173 IMPLEMENTATION .
29+
30+
31+
32+ METHOD z2ui5_if_app ~main .
33+
34+ me ->client = client .
35+
36+ IF client->get( )-check_on_navigated = abap_true .
37+
38+ mt_data = VALUE #( ( name = 'Theo' )
39+ ( name = 'Lore' ) ).
40+
41+ client->_bind( mt_data ).
42+
43+ render_main( ).
44+
45+ RETURN .
46+ ENDIF .
47+
48+ ENDMETHOD .
49+
50+ METHOD render_main .
51+
52+ DATA (xml ) =
53+ '<mvc:View xmlns="sap.m" xmlns:mvc="sap.ui.core.mvc" xmlns:template="http://schemas.sap.com/sapui5/extension/sap.ui.core.template/1">' &&
54+ ' <App> ' &&
55+ ' <Page title="XML Templating"> ' &&
56+ ' <OverflowToolbar> ' &&
57+ ' <ToolbarSpacer /> ' &&
58+ ' <template:repeat list="{meta>/MT_DATA}" var="MT_DATA"> ' &&
59+ ' <ToggleButton text="{MT_DATA>NAME}" /> ' &&
60+ ' </template:repeat> ' &&
61+ ' <ToolbarSpacer /> ' &&
62+ ' <OverflowToolbarButton icon="sap-icon://action-settings" /> ' &&
63+ ' </OverflowToolbar> ' &&
64+ ' </Page> ' &&
65+ ' </App> ' &&
66+ '</mvc:View>' .
67+
68+ client->view_display( xml ).
69+
70+
71+ ENDMETHOD .
72+
73+ 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_173</CLSNAME >
7+ <LANGU >E</LANGU >
8+ <DESCRIPT >basic - templation</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