cancel
Showing results for 
Search instead for 
Did you mean: 

attachPatternMatched not triggering First Time

former_member466137
Participant
0 Kudos

Hello,

We are using Object Page and for blocks we have defined separate controllers. Object controller does trigger method attached using attachPatternMatched but block controllers don't trigger first time. But from next object navigation it starts working.

I was using 1.60 UI5 version and today got upgraded to 1.71.11 and the apps stopped working for first time user hits Customer Navigation.

It was working just fine in 1.60....

Any thoughts?

Object Controller

this.getRouter().getRoute("object").attachPatternMatched(this._onObjectMatched, this); - All good...

Block Controller

this.getRouter().getRoute("object").attachPatternMatched(this._onBlockGeneralC, this); - this one starts triggering from next time. But first load not triggering

View Entire Topic
FlorianVogt
Advisor
Advisor
0 Kudos

Another workaround would be to execute the this._onBlockGeneralC in the onInit after attaching to the route. So, the code is executed at the first time also.

former_member466137
Participant
0 Kudos

Yes...I might need help there....How can i access the Object Parameters in inInit of Block Controller? I just started with UI5 6 months back.

Is it good idea to define a method in base controller and dump those parameters in Globals and read in inInit. Any better idea?

I have raised yesterday support ticket....

customer = oEvent.getParameter("arguments").Customer,