cancel
Showing results for 
Search instead for 
Did you mean: 

after add module on View it doesn't work

Former Member
0 Kudos

Hello, experts!

I use 2 views, and made routing there between. It work.

After that I would like use dialog on View 2. I add button and module  'sap/m/Dialog', on View2.

I have a problem, because view2 dont work after that.

view2: code:


sap.ui.define([

'jquery.sap.global',

  'sap/m/MessageBox',

  'sap/m/MessageToast',

  'sap/m/Dialog',

  // 'sap/ui/model/Filter',

  'sap/ui/core/mvc/Controller'

code:

https://github.com/EvgenySemenov/sap-ui5-routing_params_dialog

Accepted Solutions (0)

Answers (1)

Answers (1)

saurabh_vakil
Active Contributor
0 Kudos

Hi,

In the view2.controller.js in the first array parameter to the define function you are loading dependencies to MessageBox, MessageToast, Dialog and the Controller. But in the second parameter which is the function, you are not including these in the exact same order and also the Dialog alias is missing. Try changing the arguments in the function as below:


sap.ui.define([

  'sap/ui/core/mvc/Controller',

  'sap/m/MessageBox',

  'sap/m/MessageToast',

  'sap/m/Dialog'

], function(Controller, MessageBox, MessageToast, Dialog) {

......

Regards,

Saurabh

Former Member
0 Kudos

Hi, thanks for your answer! Maybe it was problem in my local web ide, because I restart my laptop and it application started work.