sap.ui.define(
["sap/m/GenericTile"],
function(Control) {
"use strict";
return Control.extend("ssm.controls.ColorTile", {
metadata: {
properties: {
"bgColor": {"type": "sap.ui.core.CSSColor", "defaultValue": "#ffffff"}
}
},
renderer : function(oRm,oControl){
oRm.write("<div");
oRm.writeControlData(oControl);
oRm.addStyle("background", oControl.getBgColor());
oRm.writeStyles();
//calling the original Renderer
sap.m.GenericTileRenderer.render(oRm,oControl);
oRm.write("</div>");
}
});
}
);
<mvc:View
controllerName="ssm.controller.Home"
height="100%"
xmlns="sap.m"
xmlns:mvc="sap.ui.core.mvc"
xmlns:l="sap.ui.layout"
xmlns:c="ssm.controls"
xmlns:html="http://www.w3.org/1999/xhtml">
<Page title="Colored Tile">
<content>
<c:ColorTile
header="Test"
subheader="colored Tile"
state="Loaded"
scope="Display"
class="sapUiTinyMarginBegin sapUiTinyMarginTop"
sizeBehavior=""
bgColor="#FFA500">
<TileContent unit="€" footer="...">
<NumericContent
withMargin="false"
value="45"
valueColor=""
indicator=""
scale=""/>
</TileContent>
</c:ColorTile>
</content>
</Page>
</mvc:View>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
8 | |
5 | |
5 | |
4 | |
4 | |
4 | |
4 | |
3 | |
3 | |
3 |