Skip to Content

Adding Multiple Images inside Generic Tiles

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>
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    avatar image
    Former Member
    Feb 01, 2017 at 12:17 PM

    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>
    Add comment
    10|10000 characters needed characters exceeded

  • Feb 01, 2017 at 12:27 PM

    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

    Add comment
    10|10000 characters needed characters exceeded