Как вставить фид фида в представление XML в sapui5.?/ Как связать или подключить controller.js(ссылка, которую я предоставил в контроллере) к представлению xml
xmlns:core="sap.ui.core" xmlns:l="sap.ui.layout" xmlns:s="sap.m" xmlns ="sap.suite.ui.commons" controllerName="view.View1" >
<l:HorizontalLayout class="sapUiSmallMargin" >
<GenericTile class="sapUiSmallMargin" frameType="OneByOne" header="Browse by Industries" press="Press" size="M" width="auto">
<tileContent>
<TileContent footer="Packaged Solutions" size="M">
<content>
<NumericContent icon="sap-icon://factory" size="M" value="143" valueColor="Error"/>
</content>
</TileContent>
</tileContent>
</GenericTile>
<GenericTile class="sapUiSmallMargin" frameType="OneByOne" header="Browse by Technology" press="press" size="M" width="auto">
<tileContent>
<TileContent footer="Packaged Solutions" size="M">
<content>
<NumericContent icon="sap-icon://energy-saving-lightbulb" size="M" value="53" valueColor="Error"/>
</content>
</TileContent>
</tileContent>
</GenericTile>
<GenericTile class="sapUiSmallMargin" frameType="OneByOne" header="Browse by Focus Topic" press="press" size="M" width="auto">
<tileContent>
<TileContent footer="Packaged Solutions" size="M">
<content>
<NumericContent icon="sap-icon://globe" size="M" value="143" valueColor="Error"/>
</content>
</TileContent>
</tileContent>
</GenericTile>
<GenericTile class="sapUiSmallMargin" frameType="OneByOne" header="A-Z Index" press="press" size="M" width="auto">
<tileContent>
<TileContent footer="Packaged Solutions" size="M">
<content>
<NumericContent icon="sap-icon://list" size="M" value="143" valueColor="Error"/>
</content>
</TileContent>
</tileContent>
</GenericTile>
</l:HorizontalLayout>
<l:HorizontalLayout class="sapUiSmallMargin" >
<GenericTile class="sapUiSmallMargin" frameType="OneByOne" header="Hot News" press="press" size="M" width="auto" headerImage="sap-icon://newspaper">
<tileContent>
<TileContent footer = "Packaged Solutions" size="M">
<content>
<NumericContent icon="sap-icon://list" size="M" value="143" valueColor="Error"/>
</content>
</TileContent>
</tileContent>
</GenericTile>
<GenericTile class="sapUiSmallMargin" frameType="OneByOne" header="Build and Publish Partner Solutions" press="press" size="M" width="auto" headerImage="sap-icon://action-settings">
<tileContent>
<TileContent size="M">
<content>
<NumericContent icon="sap-icon://list" size="M" value="143" valueColor="Error" />
</content>
</TileContent>
</tileContent>
</GenericTile>
</l:HorizontalLayout>
</s:Page>
В контроллере, как я должен.. https://sapui5.hana.ondemand.com/test-resources/sap/suite/ui/commons/demokit/FeedTile.html
1 ответ
Решение
Как это:
<FeedTile items="{/data}">
<items>
<FeedItem
title="{title}"
image="{img}"
link="{url}"
source="{src}"
publicationDate="{pubdate}" />
</items>
</FeedTile>
FeedTile
имеет агрегацию items
который занимает FeedItem
как его шаблон