Skip to Content
0
Jun 16, 2021 at 10:47 PM

get ID of generic tile

67 Views

Hi. I have a generic tile with ID on the screen and on the event press I am trying to get the ID. Instead of expected ID, I get the full name with container "container-launchpad---Launchpad--gtUoM". How can I get ID?

<mvc:View xmlns:mvc="sap.ui.core.mvc" xmlns="sap.m" controllerName="launchpad.controller.Launchpad" displayBlock="true">
    <Shell id="shell">
        <App id="app">
            <GenericTile class="sapUiTinyMarginBegin sapUiTinyMarginTop tileLayout" header="{i18n>UoM_Header}" press="tilePress" subheader="{i18n>UoM_Subheader}" id="gtUoM">
                <TileContent>
                    <ImageContent src="sap-icon://home-share"/>
                </TileContent>
            </GenericTile>
        </App>
    </Shell>
</mvc:View>

tilePress : function(oEvent) {
               
    var sAppl = '';
    switch (oEvent.getSource().getId()) {
    case 'gtUoM':
        sAppl = '/psmymeasure/webapp/index.html';
       break;
    default:
      break;
             }
   URLHelper.redirect( "/tiles/" + sAppl, true);
            }