Hi Guys,
I have a requirement to display multiple images inside Generic Tile. I am able to display only one of the images(the image added recently).
The code I tried to display images inside the tile
<GenericTile class="sapUiTinyMarginBegin sapUiTinyMarginTop tileLayout" header="{i18n>contactPage}" frameType="TwoThirds" press="_onStandardTilePress7"> <tileContent> <TileContent> <content> <Image class="contacatPerson" src='/webapp/cpi1.jpg'/> <Image class="contacatPerson" src='/webapp/cpi2.jpg'/> </content> </TileContent> </tileContent> </GenericTile>
Hi Srinivas,
I see titleContent is the aggregation here with an array of TileContent. So, please try the below.
<GenericTile class="sapUiTinyMarginBegin sapUiTinyMarginTop tileLayout" header="{i18n>contactPage}" frameType="TwoThirds" press="_onStandardTilePress7"> <tileContent> <TileContent> <content> <Image class="contacatPerson" src='/webapp/cpi1.jpg'/> </content> </TileContent> <TileContent> <content> <Image class="contacatPerson" src='/webapp/cpi2.jpg'/> </content> </TileContent> </tileContent> </GenericTile>
Hi Murali,
Thank you for the suggestion. The answer was very helpful.
Regards,
Srinivasan
Hi Srini,
Actually TileContent aggregation content have cardinality 0..1 which means you can have either 0 or 1 control inside the content of TileContent , so either provide more than one TileContent in sap.m.Tile as shown by Murali above or just put all the images in a container or layout and add that container or layout as the content of the TileContent which is than added to sap.m.Tile content
thanks
Viplove
Hi Viplove,
Thank you for the information. It was of great help understanding more about TileContent.
Regards,
Srinivasan