Worklight无法在真实的设备上要求DOJO组合框-无法加载.../dijit/form/nls/it/ComboBox.js

tjrkku2a  于 2022-12-16  发布在  Dojo
关注(0)|答案(2)|浏览(138)

Dojo 1.8工作灯5.0.6
在浏览器和android模拟器上都能正常工作,但如果我在真实的中执行应用程序,解析就不起作用了。

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() {
            });
        });

}
这是平板电脑上的浏览器错误:

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

但此错误不会出现在PC浏览器上但文件夹中有!x1c 0d1x

pes8fvy9

pes8fvy91#

你试过这样做吗?

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();
    });

问候

u5rb5r59

u5rb5r592#

您可能正在使用Worklight V6?
当前在Android设备上运行时存在问题。您可以在此处找到解决方法:Worklight核心网络图层. js错误

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.

相关问题