如何在sapui5中的XML视图中插入一个feed tile。?如何绑定或连接controller.js(控制器中提供的链接)到xml视图

时间:2015-08-12 10:08:19

标签: xml sap sapui5

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 个答案:

答案 0 :(得分:0)

像这样:

<FeedTile items="{/data}">
    <items>
        <FeedItem 
            title="{title}" 
            image="{img}" 
            link="{url}" 
            source="{src}" 
            publicationDate="{pubdate}" />
    </items>
</FeedTile>

FeedTile的汇总itemsFeedItem为模板