2013-08-27 39 views
1

道場1.8 工作燈5.0.6工作燈不要求真實設備-fail道場Combobx加載... /dijit/form/nls/it/ComboBox.js

在瀏覽器和Android模擬器的所有作品,但如果我真的執行應用程序,解析不起作用。 這是的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() { 
      }); 
     }); 

}

這是瀏覽器的平板電腦上的錯誤:

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

,但這個錯誤不會出現在PC瀏覽 但也有該文件夾中! enter image description here

回答

1

您可能正在使用Worklight V6?

目前在Android設備上運行時存在問題。您可以在這裏找到解決方法: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. 
+0

我使用WL 5.06。如果我刪除組合框,所有的作品。但是,如果我添加組合框並且需要組合框,那麼會出現錯誤 – userA91

+0

不確定此錯誤是否也在先前版本的Worklight中,所以嘗試我猜並沒有什麼壞處。我已經有了和V6中的這個bug一樣的行爲。 –

0

你嘗試做這種方式?

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

問候