Is Worklight App based on Dojo toolkit 1.9 supported in Windows phone 8?

363 Views Asked by At

I am working on a worklight App using it's default 1.9 Dojo Toolkit. My App is working fine in Android emulator and in the web browser simulator. I tried to test the same app in Windows phone 8 Emulator but I am not able to see the whole Home page. I can see only Tabbar Button part used at the button while I am not able to see the list items used in the page. My Question is does Dojo Toolkit 1.9 supports Windows Phone 8?

I have visited dojo 1.9 release link and It says that in dojo 1.9, support for Windows Phone 8 has been included. If this is true, What could be the reason of failure for my app in Windows phone 8 emulator?

I also got below log when I created Windows phone 8 environment in my Worklight Project.

     [2013-11-12 22:14:08]             Environment 'Windows Phone 8' was created.
     [2013-11-12 22:14:13]             Starting build process: application 'KaiserTestApp', environment 'windowsphone8'
     [2013-11-12 22:14:28]             Windows Phone 8 app may not work well with Dojo toolkit included for this Application.  Use a different Worklight Project, without Dojo toolkit, for Windows Phone 8 apps.
     [2013-11-12 22:14:28]             Application 'KaiserTestApp' with environment 'windowsphone8' build finished.

home page

1

There are 1 best solutions below

8
On

There is a WP8 VM bug that might hurt ListItem and might explain your issue. To check if that you are falling into this just monkey patch the _ItemBase _setSelectedAttr method this way and see if that fixes your issue:

    _setSelectedAttr: function(/*Boolean*/selected){
        // summary:
        //      Makes this widget in the selected or unselected state.
        // description:
        //      Subclass should override.
        // tags:
        //      private
        if(selected){
            var p = this.getParent();
            if(p && p.selectOne){
                // deselect the currently selected item
                var arr = array.filter(p.getChildren(), function(w){
                    return w.selected;
                });
                array.forEach(arr, function(c){
                    this._prevSel = c;
                    c.set("selected", false);
                }, this);
            }
        }
        this.selected = selected;
        //this._set("selected", selected);
    }

If that is fixing your issue let us know and we will see how to release an updated version of Dojo that workarounds that WP8 WM bug.