Skip to Content
0
Oct 01, 2019 at 05:38 PM

Access a view from Fiori Tile

46 Views

Hi everyone.

I have a project that I want to access one view from one tile and other view from another tile, without extra code, only with Tile configuration. Is that possible?

This is my routing:

"routing": {
          "config": {
            "routerClass": "sap.m.routing.Router",
            "viewType": "XML",
            "viewPath": "***********",
            "controlId": "App",
            "clearTarget": false,
            "controlAggregation": "pages"
          },
          "targets": {
            
            "CockpitAcoes": {
            "viewName": "CockpitAcoes",
            "viewId": "CockpitAcoes",
            "transition": "slide"
            },
            
            "TesteDEX": {
            "viewName": "TesteDEX",
            "viewId": "TesteDEX",
            "transition": "slide"
            },
            
            "TesteDefault": {
            "controlAggregation": "pages",
            "viewName": "TesteDefault",
            "viewId": "TesteDefault",
            "viewLevel": 1,
            "transition": "slide"
            }
            
          },
         "routes": [
              
              {
                "pattern": "CockpitAcoes",
                "name": "CockpitAcoes",
                "target": [
                  "CockpitAcoes"
                  ]
              },
              
              {
                "pattern": "TesteDEX",
                "name": "TesteDEX",
                "target": [
                  "TesteDEX"
                  ]
              },
              
              {
                "pattern": "",
                "name": "TesteDefault",
                "target": [
                  "TesteDefault"
                  ]
              }
              
          ]
      }

I have tried this configuration but when I click in the tile the "&/TesteDEX" does not appear in the URL, so the app routes to the "" pattern which is the TesteDefault view (blank page).

If I manually type "&/TesteDEX" in the URL the view TesteDEX is show so I know everything works, but how to achieve this via Tile configuration? Is it possible?

And should both tiles use the same target mapping? They're going to the same project, but accessing different views.

Thanks for any response.

Attachments

3.jpg (23.1 kB)
4.jpg (125.8 kB)
2.jpg (48.7 kB)