1

Dojo 1.8 Worklight 5.0.6

On Browser and android emulator all works, but if I execute the app on real the parse didn't works. This is Dojo.js

function dojoInit() {
require([ "dojo",

          "dojo/parser", "dojox/mobile", "dojox/mobile/compat",
          "dojox/mobile/ScrollableView", 
          "dojox/mobile/ScreenSizeAware",
          "dojox/mobile/FixedSplitter",
          "dojox/mobile/Container",
          "dojox/mobile/ComboBox"  
          ],

        function(dojo) {
            dojo.ready(function() {
            });
        });

}

This is browser's error on tablet:

xxx.26.81:8080/apps /services/preview/AcgTablet/common/0/default/dijit/form/nls/it/ComboBox.js Error dojo.js:26

but this error doesn't appear on pc browser But there are in the folder! enter image description here

Cœur
  • 37,241
  • 25
  • 195
  • 267
userA91
  • 47
  • 1
  • 7

2 Answers2

1

You are probably using Worklight V6?

There is an issue currently to run on Android devices. You can find the workaround here: Worklight core-web-layer.js errors

For your issue with running on Android, if you're using Worklight 6.0 with a new project, copy                the following files from the Dojo Library project that was created alongside the Worklight project:

toolkit/dojo/dojo/nls/core-web-layer_ROOT.js
toolkit/dojo/dojo/nls/mobile-ui-layer_ROOT.js

These files then must be added to your Worklight project's www/dojo/nls/ directory.

In addition to including the *_ROOT.js files, you may also need to remove the development      configuration from the application. To do this, open the Console view (Window > Show View > Other... > Console). From the Console view, click the Open Console button and choose Dojo Library Requests from the list. From the Dojo Library Requests console, click the View Menu (the triangle in the toolbar), and uncheck Provide Library Resources. After this, build and deploy your application to your emulator or device.
Community
  • 1
  • 1
Driss Amri
  • 1,805
  • 2
  • 20
  • 28
  • i use WL 5.06 . If i delete combobox, all works. But if I add combobox and require Combobox there is the error – userA91 Aug 27 '13 at 08:55
  • Not sure if this bug was in previous versions of Worklight also, it doesn't hurt to try I guess. I've had the same behaviour as you are descriping with this bug in V6. – Driss Amri Aug 27 '13 at 14:54
0

have you try doing it this way?

function dojoInit() {
require(["dojo/ready",
      "dojox/mobile/parser", 
      "dojox/mobile",
      "dojox/mobile/compat",
      "dojox/mobile/ScrollableView", 
      "dojox/mobile/ScreenSizeAware",
      "dojox/mobile/FixedSplitter",
      "dojox/mobile/Container",
      "dojox/mobile/ComboBox",
      "dojo/ready!"
      ],
    function(ready,parser,Container,ComboBox) {
        ready(function() {
          alert("I was clicked");
        });

 // Parse the page for widgets!
    parser.parse();
    });

Regards

MiBrock
  • 1,100
  • 1
  • 11
  • 22