Skip to Content
author's profile photo Former Member
Former Member

after add module on View it doesn't work

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Jul 18, 2016 at 07:40 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.