Forum Simplifier Forum Modules action “send to app” not working

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #19824
    AvatarKlaus79
    Participant
    • Topics: 36
    • Replies: 45

    I do not get a channel from following code snippet.

    var oChannel = getChannel(this, sChannelId);
    if (!oChannel) {
    // no channel
    if (Log.isLoggable(Log.Level.DEBUG, “sap.ui.core.EventBus”)) {
    Log.debug(“Failed to publish into channel ‘” + sChannelId + “‘.” + ” No such channel.”, sChannelId, “sap.ui.core.EventBus”);
    }
    return;
    }

    Problem is following line: getChannel(this, sChannelId);

    getChannel returns ‘undefined’.

    sChannelId = Password_ModulToApp

     

    which channel/data is missing?

     

    #19825
    AvatarKlaus79
    Participant
    • Topics: 36
    • Replies: 45
    Up
    0
    Down

    there is no ‘Password_ModulToApp’ in oEventBus (see below).

    Name of ‘sChannelId’ is generated by Simplifier.

     

    oEventBus._mChannels

    [object]
    __proto__

    [object]
    ApplicationChannel

    [object (constructor)]
    Home

    [object (constructor)]
    Login

    [object (constructor)]
    Main

    [object (constructor)]
    sap.ui

    [object (constructor)]
    Screen_Approval

    [object (constructor)]
    Screen_Infosystem

    [object (constructor)]
    Screen_Main

    [object (constructor)]
    Screen_Password

    [object (constructor)]
    Screen_Roles

    [object (constructor)]
    Screen_StatusDialog

    [object (constructor)]
    Screen_User_Maintain

    [object (constructor)]
    Screen_valueHelp_Customer

    [object (constructor)]
    SuperAdministration

    [object (constructor)]

    #19829
    AvatarMalfurion
    Keymaster
      Has successfully completed the online course No-Code.
      Has successfully completed the online course Low-Code.
      Has successfully completed the online course Pro-Code.
    • Topics: 0
    • Replies: 94
    Up
    0
    Down

    Did you changed the Interface name in your module ?

    because this would perhaps be the problem.

    • This reply was modified 1 year ago by Malfurion.
    #19832
    AvatarKlaus79
    Participant
    • Topics: 36
    • Replies: 45
    Up
    0
    Down

    No, nothing changed.

    sap.ui.getCore().getEventBus().publish(this.getModuleName() + “ToApp”, “statusMessage”, adataForstatusMessage);

    the generated code “this.getModuleName() + “ToApp” creates in my oppinion the wrong channel name <modul_name>+”ToApp” (results in my example in:  “Password_ModulToApp”

     

    But if i change it to “Screen_StatusDialog” (channel will be found now) I get another error  “no event is registered” (see Simplifier code below).

    var aEventListeners  will be ‘undefined’.

     

    var aEventListeners = EventProvider.getEventList(oChannel)[sEventId];
    if (Array.isArray(aEventListeners)) {
    // this ensures no ‘concurrent modification exception’ occurs (e.g. an event listener deregisters itself).
    aEventListeners = aEventListeners.slice();
    var oInfo;
    for (var i = 0, iL = aEventListeners.length; i < iL; i++) {
    oInfo = aEventListeners[i];
    this._callListener(oInfo.fFunction, oInfo.oListener || this, sChannelId, sEventId, oData);
    }
    } else if (Log.isLoggable(Log.Level.DEBUG, “sap.ui.core.EventBus”)) {
    // no listeners
    Log.debug(“Failed to publish Event ‘” + sEventId + “‘ in ‘” + sChannelId + “‘.” + ” No listeners found.”, sChannelId + “#” + sEventId, “sap.ui.core.EventBus”);
    }

     

    #21773
    ArminArmin
    Moderator
      Has successfully completed the online course No-Code.
      Has successfully completed the online course Low-Code.
      Has successfully completed the online course Pro-Code.
    • Topics: 0
    • Replies: 40
    Up
    0
    Down

    Hello,

    is this problem still occuring inside of your application? There should have been a fix for this problem included in hotfix 69 for Simplifier release 5.0 if I read our internal release notes correctly.

     

    Regards,

    Armin

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.