0
votes

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 ?

1
Same link has information that simple dialog is supported in Windows phone 8. Any error on Blackberry 10 console?dhineshsundar
Provide your SimpleDialog implementation, i.e. what are you calling and how you are calling it.Idan Adar
I updated my question. there are no errors - I call from javascript console, the popup appear, but handler function never called. I also tried first with my existing code, and handler not called on blackberry.WiPhone
@WiPhone, What happens if you replace the console.log() with an alert()?Idan Adar
@IdanAdar nothing happen. - I've just tested an old version, and handler callback was working for my old version, compiled using webworks10 1.x - The problem seems to be related to WL6.0 when building with Webworks10 2.2WiPhone

1 Answers

0
votes

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.