Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 10548

Re: URL for a view

$
0
0

Hi Sandip,

 

I did it in this way:

 

var currentView = document.location.hash;                var view;                switch(currentView) {                    default:                    case '#view1':                        view = sap.ui.view({                            id:"view1",                             viewName:"app.view1",                             type:sap.ui.core.mvc.ViewType.JS                            });                        break;                    case '#view2':                        view = sap.ui.view({                            id:"view2",                             viewName:"app.view2",                             type:sap.ui.core.mvc.ViewType.JS                            });                        break;                    case 'view3':                        view = sap.ui.view({                            id:"view3",                             viewName:"app.view3",                             type:sap.ui.core.mvc.ViewType.JS                            });                        break;                }                view.placeAt("content");        </script>    </head>    <body class="sapUiBody" role="application">        <div id="content"></div>    </body>

 

 

 

I can call the views via http://<host>:<port>/app/index.html#view1, index.html#view2 ....

 

Regards,

 

Igor


Viewing all articles
Browse latest Browse all 10548

Trending Articles



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