Sapui5 使用来自HCP(js)的数据监视磁贴

Sapui5 使用来自HCP(js)的数据监视磁贴,sapui5,Sapui5,我目前正在测试WebIDE,并尝试创建一个带有互动程序的小应用程序,该应用程序会自动使用来自HCP的数据进行自我更新 <GenericTile class="sapUiTinyMarginBegin sapUiTinyMarginTop tileLayout" header="Cumulative Totals" subheader="Expenses" frameType="OneByOne" press="press"> <tileContent>

我目前正在测试WebIDE,并尝试创建一个带有互动程序的小应用程序,该应用程序会自动使用来自HCP的数据进行自我更新

<GenericTile class="sapUiTinyMarginBegin sapUiTinyMarginTop tileLayout" header="Cumulative Totals" subheader="Expenses" frameType="OneByOne"
    press="press">
    <tileContent>
        <TileContent unit="Unit" footer="Footer Text">
            <content>
                <NumericContent value="12"/>
            </content>
        </TileContent>
    </tileContent>
</GenericTile>
TileContainer是创建此功能的正确函数吗?我不确定该用哪块瓷砖

<GenericTile class="sapUiTinyMarginBegin sapUiTinyMarginTop tileLayout" header="Cumulative Totals" subheader="Expenses" frameType="OneByOne"
    press="press">
    <tileContent>
        <TileContent unit="Unit" footer="Footer Text">
            <content>
                <NumericContent value="12"/>
            </content>
        </TileContent>
    </tileContent>
</GenericTile>
如何将数据输入到互动程序的内容中

var tileContainer = new sap.m.TileContainer({
tiles : [ 
new sap.m.StandardTile({
number: "C_SENSORTEMP",
height: "50px",
icon : "sap-icon://play",
title : "Temparature",
frameType: "TwoByOne",
press : function() {
oController._eventHandler("start");
app.to("page2");
})
]
});
<GenericTile class="sapUiTinyMarginBegin sapUiTinyMarginTop tileLayout" header="Cumulative Totals" subheader="Expenses" frameType="OneByOne"
    press="press">
    <tileContent>
        <TileContent unit="Unit" footer="Footer Text">
            <content>
                <NumericContent value="12"/>
            </content>
        </TileContent>
    </tileContent>
</GenericTile>

是的,这是正确的方法。下面是一个小例子:

<GenericTile class="sapUiTinyMarginBegin sapUiTinyMarginTop tileLayout" header="Cumulative Totals" subheader="Expenses" frameType="OneByOne"
    press="press">
    <tileContent>
        <TileContent unit="Unit" footer="Footer Text">
            <content>
                <NumericContent value="12"/>
            </content>
        </TileContent>
    </tileContent>
</GenericTile>

<GenericTile class="sapUiTinyMarginBegin sapUiTinyMarginTop tileLayout" header="Cumulative Totals" subheader="Expenses" frameType="OneByOne"
    press="press">
    <tileContent>
        <TileContent unit="Unit" footer="Footer Text">
            <content>
                <NumericContent value="12"/>
            </content>
        </TileContent>
    </tileContent>
</GenericTile>

您可以找到更多示例。

好的。谢谢。例如,openweather中的城市温度绑定在view.js中会是什么样子?来源:您发送的链接不适用于我(需要401授权)。但是从那边的json示例(()章API响应中的天气参数,json,API响应的示例。):“main”:{“temp”:293.25,…您可以在xml.view中尝试这个
<GenericTile class="sapUiTinyMarginBegin sapUiTinyMarginTop tileLayout" header="Cumulative Totals" subheader="Expenses" frameType="OneByOne"
    press="press">
    <tileContent>
        <TileContent unit="Unit" footer="Footer Text">
            <content>
                <NumericContent value="12"/>
            </content>
        </TileContent>
    </tileContent>
</GenericTile>