Quantcast
Channel: SCN : All Content - SAPUI5 Developer Center
Viewing all articles
Browse latest Browse all 6178

AttachEventHandler in routing method

$
0
0

Hello Experts,

 

 

First View

1.PNG     

 

 

Second View

2.PNG

 

My requirement is , the first tile "Risk analysis" should be clickable, whereas the other two should not be clickable (when i run the app fro first time).

I am using Routing concept for navigation.

 

2) On click of the risk analysis tile i am navigating to Second View. When i press the submit button, i want the "Project Complexity Summary" of the first view to be clickable.

 

I tried using attachPress handler



here is the code on submit of the secondView


on function submit()

{


sap.ui.getCore().byId("id of the project complexity tile").attachPress(sap.ui.controller("***.**.view.ProjectComplexity").navigateToProjectComplex);

//


}


Here navigateToProjectComplex method is present in the controller of the first View


 

 

  navigateToProjectComplex:function(){

  this._oRouter.navTo("ProjComplex",{});

  },

 

When i do this, it is throwing me this._oRouter is undefined

 

 

pls help


Viewing all articles
Browse latest Browse all 6178

Trending Articles



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