Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

MessageBox not displayed in Firefox

Hi there,

in my application running on WAS Java 7.40 SP09 (Sapui 1.24) I discovered that message boxes are not displayed in Firefox 36.

I've tried the following:

jQuery.sap.require("sap.m.MessageBox");

sap.m.MessageBox.show("Test", {

                                icon : sap.m.MessageBox.Icon.ERROR,

                                title : "Error"

});

and also

sap.ui.commons.MessageBox.alert("Hello");

But no text box is displayed.

In Chrome/IE it works.

Is that a known issue?

Thanks in advance.

Best regards,

Thorsten.

Tags:
Former Member
Former Member replied

I've now succeeded by moving the method call from the onInit() to the onBeforeRendering() method:

onBeforeRendering : function() {

  

    var taskId = getValueOfURLParameter("taskId");

  

    // Check if task is not processed yet

    this.checkTask(taskId);  

},

This is the checkTask(taskId) method:

checkTask : function(taskId) {

    var oTasksODataModel = sap.ui.getCore().getModel("tasksODataModel");

    oTasksODataModel.read("/TaskCollection('" + taskId

                            + "')", null, null, true, fSuccess, fError);

  

    function fSuccess(oEvent) {

        console.log("Task read successfully!");

        var status = oEvent.Status;

        var processor = oEvent.Processor;

        var user = getUser();

        if (status == "COMPLETED") {

            // Task has already been completed

            sap.ui.commons.MessageBox.alert("Task has already been completed");

            return;

        }

        if (status == "RESERVED") {

            // Task is reserved

            if (processor != "" && processor != user.toLowerCase()) {

                // Processor != current user      

                sap.ui.commons.MessageBox.alert("Task has already been reserved by " + processor);

              

                return;

            }

        }

    };

}

0 View this answer in context

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question