ibm-mobilefirstblackberry-10simpledialog

IBM Worklight SimpleDialog platforms limits


I am using Worklight 6.0 for an application working on 4 platforms (iOS, Android, Blackberry and Windows Phone 8). While using WL.SimpleDialog I can notice today that the handler button option/callback does not work on Blackberry 10. Also when reading the documentation at http://www-01.ibm.com/support/knowledgecenter/SSZH4A_6.0.0/com.ibm.worklight.help.doc/apiref/r_wl_simpledialog_show.html there is nothing that mention that.

For the test on Blackberry, I am using Webworks 10 version 2.2, and I am inspecting the device. I call the SimpleDialog this way:

WL.SimpleDialog.show("Alert", "Popup message", [{text:"ok", handler: function() {
                                console.log("hello")                                    ;
                                }}]);

The message "hello" is not appearing on console after I press the button and there are no errors appearing on console too.

Update : One more detail: I checked an old version, compiled 1 year ago with webworks 1.0, and handler is working for the old version. Is this an issue related to Worklight 6.0 and Blackberry Webworks 2.2 ?

Do you confirm that the handler option is not supported for Blackberry ? also is it supported for Windows Phone ?


Solution

  • Update: Fix for WL.SimpleDialog is available starting November 25th, 2014. You should be able to download the latest 6.0.0.x iFix from IBM Fix Central (or request it via a support request (PMR)).


    Per the Common UI Controls training module (slide #13):

    When you use WL.SimpleDialog in Windows Phone 8, you can use at most four buttons in each instance of WL.SimpleDialog.

    When you use WL.SimpleDialog in Android, you can use at most three buttons in each instance of WL.SimpleDialog.

    As for the callback in BlackBerry 10, it should work. Are you getting any errors?
    Also provide your SimpleDialog implementation, i.e. what are you calling and how you are calling it.

    Edit: Make sure you have added all required plug-ins: org.apache.cordova.dialogs AND org.apache.cordova.invoke.

    Edit #2: the callback not getting invoked has been confirmed as a defect. To receive a fix, please open a PMR.