Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html><head>
    <meta http-equiv='X-UA-Compatible' content='IE=edge' />
    <meta http-equiv='Content-Type' content='text/html;charset=UTF-8'/>
    <title>test</title>
<script id="sap-ui-bootstrap"
   type="text/javascript"
   src="https://sapui5.hana.ondemand.com/resources/sap-ui-core.js"
   data-sap-ui-theme="sap_goldreflection"
   data-sap-ui-libs="sap.suite.ui.commons, sap.m"></script>
    <script>
        var oTileContent = new  sap.suite.ui.commons.TileContent({content: new sap.m.Text({text: "Blabla"})});
        var cancelTilePress = false;
        var oGenericTile = new sap.suite.ui.commons.GenericTile({
                frameType: "TwoByOne",
                header: "My HEader",
                headerImage: "sap-icon://settings",
                tileContent: oTileContent
            });
            oGenericTile._oImage.attachPress(function(oEvent) {
                sap.m.MessageToast.show("Icon has been pressed");
                cancelTilePress = true;
            });
            oGenericTile.attachPress(function(oEvent) {
                if(!cancelTilePress){
                    sap.m.MessageToast.show("I am always triggered first!!!   :-(");
                } 
                cancelTilePress = false;
            });
        oGenericTile.placeAt('content');
    </script>
</head>
<body class='sapUiBody'>
    <div id='content'></div>
</body>
</html>
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
anonymouspro
0viewers