Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 3523

Tile Container - Linking Tile IDs (calling different views when tiles are pressed)

$
0
0

Hi,

I have created a main page with tile container and want that when I click tile1 then view1 should be called, when clicked Tile2 view2 should be called.

Fairly new to SAPUI5 I have created the main page with tiles but I am not able to link the tile id and call the respective view. Only the first view is getting called whether I click tile1 or tile2 or tile3.

To make things simple I tried raising an alert when tiles are clicked. But this is not working.

Any help would be appreciated.

Main Page.JPGFirst View.JPG

Below are my codes:

Index

<!DOCTYPE HTML>
<html>
<head>
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta http-equiv='Content-Type' content='text/html;charset=UTF-8'/>

  <script src="resources/sap-ui-core.js"
    id="sap-ui-bootstrap"
    data-sap-ui-libs="sap.m"
    data-sap-ui-theme="sap_bluecrystal">
  </script>

  <script>
  // Best practice would be to set this stuff up in an Component.js
     // but let's not over-complicate stuff for demonstration purposes
    
     sap.ui.localResources("view");
     var app = new sap.m.App({
       initialPage: "idMain"
     });

    
     var page = sap.ui.view({
       id: "idMain",
       viewName: "view.Main",
       type: sap.ui.core.mvc.ViewType.XML
     });
     app.addPage(page);
     app.placeAt("content");
  </script>

</head>
<body class="sapUiBody" role="application">
  <div id="content"></div>
</body>
</html>

 

-------------------------------------------MAIN.VIEW-------------------------------------


Viewing all articles
Browse latest Browse all 3523

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>