<mvc:View controllerName="com.Card.controller.View1" xmlns:mvc="sap.ui.core.mvc" displayBlock="true" xmlns="sap.m" xmlns:f="sap.f"
xmlns:card="sap.f.cards">
<f:Card class="sapUiMediumMargin" width="300px">
<f:header>
<card:Header title="SAP Fiori 3.0 Demo" subtitle="Time for SAP Fiori 3.0"/>
</f:header>
<f:content>
<List showSeparators="None" items="{path: '/productItems'}">
<CustomListItem>
<HBox alignItems="Center" justifyContent="SpaceBetween">
<VBox class="sapUiSmallMarginBegin sapUiSmallMarginTopBottom">
<Title level="H3" text="{title}"/>
<Text text="{subtitle}"/>
</VBox>
<ObjectStatus class="sapUiTinyMargin" text="{revenue}" state="{statusSchema}"/>
</HBox>
</CustomListItem>
</List>
</f:content>
</f:Card>
</mvc:View>
sap.ui.define([
"sap/ui/core/mvc/Controller",
"sap/ui/model/json/JSONModel"
], function (Controller, JSONModel) {
"use strict";
return Controller.extend("com.Card.controller.View1", {
onInit: function () {
var oModel = new JSONModel({
"productItems": [{
"title": "Notebook HT",
"subtitle": "ID23452256-D44",
"revenue": "27.25K EUR",
"statusSchema": "Success"
}, {
"title": "Notebook XT",
"subtitle": "ID27852256-D47",
"revenue": "7.35K EUR",
"statusSchema": "Error"
}, {
"title": "Notebook ST",
"subtitle": "ID123555587-I05",
"revenue": "22.89K EUR",
"statusSchema": "Warning"
}]
});
this.getView().setModel(oModel);
}
});
});
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
10 | |
9 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 | |
4 | |
3 |