@@ -29,11 +29,14 @@ PROTECTED SECTION.
2929 PRIVATE SECTION .
3030ENDCLASS .
3131
32- CLASS z2ui5_cl_demo_app_173 IMPLEMENTATION .
32+
33+
34+ CLASS Z2UI5_CL_DEMO_APP_173 IMPLEMENTATION .
35+
3336
3437 METHOD z2ui5_if_app ~main .
3538
36- client->_bind( mt_data ).
39+ * client->_bind( mt_data ).
3740 client->_bind( mt_layout ).
3841
3942 mt_data = VALUE #( ( name = 'Theo' date = '01.01.2000' age = '5' )
@@ -43,34 +46,51 @@ CLASS z2ui5_cl_demo_app_173 IMPLEMENTATION.
4346 ( fname = 'DATE' merge = 'false' visible = 'true' )
4447 ( fname = 'AGE' merge = 'false' visible = 'false' ) ).
4548
46- DATA (xml ) =
47- `<mvc:View xmlns="sap.m" xmlns:core="sap.ui.core" xmlns:mvc="sap.ui.core.mvc" xmlns:template="http://schemas.sap.com/sapui5/extension/sap.ui.core.template/1" displayBlock="true" height="100%" >` &&
48- ` <Shell>` &&
49- ` <Page>` &&
50- ` <Table items="{/MT_DATA}">` &&
51- ` <columns>` &&
52- ` <template:repeat list="{meta>/MT_LAYOUT} " var="MT_LAYOUT">` &&
53- ` <Column` &&
54- ` mergeDuplicates="{MT_LAYOUT>MERGE}"` &&
55- ` visible="{MT_LAYOUT>VISIBLE}"/>` &&
56- ` </template:repeat>` &&
57- ` </columns>` &&
58- ` <items>` &&
59- ` <ColumnListItem>` &&
60- ` <cells>` &&
61- ` <template:repeat list="{meta>/MT_LAYOUT}" var="MT_LAYOUT">` &&
62- ` <ObjectIdentifier text="{MT_LAYOUT>FNAME}"/>` &&
63- ` </template:repeat>` &&
64- ` </cells>` &&
65- ` </ColumnListItem>` &&
66- ` </items>` &&
67- ` </Table>` &&
68- ` </Page>` &&
69- ` </Shell>` &&
70- `</mvc:View> ` .
71-
72- client->view_display( xml ).
49+ * DATA(xml) =
50+ *`<mvc:View xmlns="sap.m" xmlns:core="sap.ui.core" xmlns:mvc="sap.ui.core.mvc" ` &&
51+ * `xmlns:template="http://schemas.sap.com/sapui5/extension/sap.ui.core.template/1" displayBlock="true" height="100%" >` &&
52+ *` <Shell>` &&
53+ *` <Page>` &&
54+ *` <Table items="{/MT_DATA}">` &&
55+ *` <columns>` &&
56+ *` <template:repeat list="{meta>/MT_LAYOUT} " var="MT_LAYOUT">` &&
57+ *` <Column` &&
58+ *` mergeDuplicates="{MT_LAYOUT>MERGE}"` &&
59+ *` visible="{MT_LAYOUT>VISIBLE}"/>` &&
60+ *` </template:repeat>` &&
61+ *` </columns>` &&
62+ *` <items>` &&
63+ *` <ColumnListItem>` &&
64+ *` <cells>` &&
65+ *` <template:repeat list="{meta>/MT_LAYOUT}" var="MT_LAYOUT">` &&
66+ *` <ObjectIdentifier text="{MT_LAYOUT>FNAME}"/>` &&
67+ *` </template:repeat>` &&
68+ *` </cells>` &&
69+ *` </ColumnListItem>` &&
70+ *` </items>` &&
71+ *` </Table>` &&
72+ *` </Page>` &&
73+ *` </Shell>` &&
74+ *`</mvc:View> `.
75+ *
76+ * client->view_display( xml ).
7377
74- ENDMETHOD .
7578
79+ DATA (view ) = z2ui5_cl_xml_view=>factory( ).
80+
81+ view->shell( )->page(
82+ )->table( items = client->_bind( mt_data )
83+ )->columns(
84+ )->template_repeat( list = `{meta>/MT_LAYOUT}` var = `LO`
85+ )->column( mergeduplicates = `{LO>MERGE}` visible = `{LO>VISIBLE}` )->get_parent(
86+ )->get_parent( )->get_parent(
87+ )->items(
88+ )->column_list_item(
89+ )->cells(
90+ )->template_repeat( list = `{meta>/MT_LAYOUT}` var = `LO2`
91+ )->object_identifier( text = `{LO2>FNAME}` ).
92+
93+ client->view_display( view->stringify( ) ).
94+
95+ ENDMETHOD .
7696ENDCLASS .
0 commit comments