I am using sapUI5 with SAP Hana DB to create a custom dashboard. I have a sap.m.TileContainer that contains several sap.m.CustomTiles that are connected by "aggregating" TileContainer tiles from a JSON structure.
Now I need to add another CustomTile (with different layout and content) in the init functions of my controller using the code below. It works fine in Firefox, but in Chrome, Tile just doesn't appear, and I also can't find it in HTML elements:
var oTileContainer = this.getView().byId("tileContainer"); var quantTile = new sap.m.CustomTile("quantTile",{ content: [ new sap.m.VBox({ items: [ new sap.m.Title("quantTileTitle", { width : "100%", text : "Quantitative KPIs", titleStyle : "H4", textAlign: "Begin", }).addStyleClass('sapUiTinyMarginBegin sapUiTinyMarginTop'), new sap.ui.commons.HorizontalDivider({ height : "Medium" }), new sap.m.RatingIndicator("quantTotalRating",{ enabled : false, maxValue : 5, value : 2.5 }).addStyleClass('sapUiMediumMarginBegin sapUiMediumMarginTop'), new sap.m.Label({ text : "Gesamtbewertung", width : "100%", textAlign: "Center" }).addStyleClass('') ] }) ], press: this.handleTilePress }).addStyleClass('sapMTile quantTile'); oTileContainer.insertTile(quantTile,0);
For completeness, here is the relevant part of my XML view:
<TileContainer id="tileContainer" tileDelete="handleTileDelete" tiles="{/TileCollection}"> <CustomTile class="sapMTile" press="handleTilePress"> <content> <l:FixFlex vertical="true"> <l:fixContent> <VBox> <HBox alignItems="Center"> <c:Icon src="sap-icon://{icon}" size="1rem" color="#000000" class="sapUiTinyMarginBeginEnd sapUiTinyMarginTop"/> <VBox class="sapUiTinyMarginTop"> <Title text="{title}" titleStyle="H4"/> </VBox> </HBox> <u:HorizontalDivider height="Medium" /> </VBox> </l:fixContent> <l:flexContent> <VBox> <Label text="Letzte Woche" class="sapUiTinyMargin" width="100%" textAlign="Begin"/> <HBox alignItems="Center" justifyContent="Center"> <Label text="{positive_week}" class="sapUiTinyMargin sapUiMediumMarginEnd KPIpositive"/> <Label text="{negative_week}" class="sapUiTinyMargin KPInegative"/> </HBox> <Label text="Letzter Monat" class="sapUiTinyMargin" width="100%" textAlign="Begin"/> <HBox alignItems="Center" justifyContent="Center"> <Label text="{positive_month}" class="sapUiTinyMargin sapUiMediumMarginEnd KPIpositive"/> <Label text="{negative_month}" class="sapUiTinyMargin KPInegative"/> </HBox> </VBox> </l:flexContent> </l:FixFlex> </content> </CustomTile> </TileContainer>
Can anyone think why it cannot be displayed / displayed in Chrome, but in Firefox? Is there any procedure that I can name that forces re-rendering or something like that?
thanks
source share