cancel
Showing results for 
Search instead for 
Did you mean: 

How to use html code into tiles(Generic Tile) in xml view of fiori applications?

Former Member
0 Kudos

Hi Experts,

  I tried to put the Html code in GenericTile of Xml view, finally it shows output as empty block.

Please suggest me how to use HTML code in GenericTile , so finally it need to be display the output html view in GenericTile in XML view.



Sample code :

               


                      

<s:GenericTile class="tile1"

        header="header1"

        frameType="TwoByOne">

       <s:tileContent>

            <s:TileContent footer="New Notifications">

            <s:content>

            <core:HTML content='&lt;h4&gt;Lorem ipsum&lt;/h4&gt;'>

      </core:HTML>

      </s:content>

            </s:TileContent>

        </s:tileContent>

      </s:GenericTile>




Thanks,

Nag

Accepted Solutions (0)

Answers (1)

Answers (1)

santhu_gowdaz
Active Contributor
0 Kudos

Like this,

<core:View controllerName="sap.hcm.Address" xmlns="sap.ui.commons" xmlns:core="sap.ui.core"

  xmlns:html="http://www.w3.org/1999/xhtml">

  <s:GenericTile class="tile1"

        header="header1"

        frameType="TwoByOne">

       <s:tileContent>

            <s:TileContent footer="New Notifications">

            <s:content>

<Button text="Press Me. I am a SAPUI5 Button"/>

  <html:button>No, press me. I am native HTML Button.</html:button>

      </s:content>

            </s:TileContent>

        </s:tileContent>

      </s:GenericTile>

<core:View>

Refer this link,

Using Native HTML in XML Views - UI Development Toolkit for HTML5 (SAPUI5) - SAP Library