2013-07-25 141 views
0

我使用Worklight 5.06和Dojo 1.8。 一個Eclipse崩潰後,它顯示了瀏覽器的控制檯上的錯誤:無法解析構造函數:'dojox.mobile.RoundRectCategory'

  1. 無法解析構造爲:未發現
  2. this.leftList 'dojox.mobile.RoundRectCategory'
  3. 左側列表中indefined

正如你可以在這個截圖中看到: enter image description here

dojo.connect(window, "onload", function() { 
 
    dojo.require("dijit.form.NumberSpinner"); 
 
    }); 
 
function dojoInit() { 
 

 

 
    require(["dojo", "dojo/request/script", "dojo/parser", "dojox/mobile", "dojox/mobile/compat", "dojox/mobile/deviceTheme", 
 
      "dojox/mobile/ScrollableView", 
 
      "dojox/mobile/ScreenSizeAware", 
 
      "dojox/mobile/FixedSplitter", 
 
      "dojox/mobile/Container", 
 
      "dojox/mobile/EdgeToEdgeList", 
 
      "dojox/mobile/RoundRect", n ", 
 
    \t   " 
 
      dojox/mobile/Button ", 
 
    \t   " 
 
      dojox/mobile/GridLayout ", 
 
    \t   " 
 
      dojox/mobile/Pane ", 
 
    \t   " 
 
      dojox/mobile/ScrollablePane ", 
 
    \t   " 
 
      dijit/form/DataList ", 
 

 
    \t   ],);
@import url("http://ajax.googleapis.com/ajax/libs/dojo/1.8/dojo/resources/dojo.css"); 
 
@import url("http://ajax.googleapis.com/ajax/libs/dojo/1.8/dijit/themes/claro/claro.css");
<script type='text/javascript' src='//ajax.googleapis.com/ajax/libs/dojo/1.10.4/dojo/dojo.js' data-dojo-config="parseOnLoad:true, async:'legacyAsync'"></script> 
 

 
<div id="xx" data-dojo-type="dojox.mobile.ScrollableView"> 
 

 
    <h2 data-dojo-type="dojox.mobile.RoundRectCategory" style="text-align: center;">Filtro</h2> 
 
    <div data-dojo-type="dojox.mobile.RoundRect"> 
 
    <div data-dojo-type="dojox.mobile.Pane" style="text-align: center;"> 
 
     <input id="lll" type="text" onblur="ordinaItemCataloghi('cc')"> 
 
     <input id="ddd" type="text" placeholder="Descrizione catalogo" onblur="ordinaItemCataloghi('dd')> 
 
\t \t \t \t \t <input id=" linea_prodotto " type="text " placeholder="Linea prodotto " 
 
\t \t \t \t \t \t onblur="ordinaItemCataloghi('ll') "> 
 
\t \t \t \t </div> 
 
\t \t \t </div> \t \t 
 
\t \t \t <h2 data-dojo-type=" dojox.mobile.RoundRectCategory " 
 
\t \t \t \t style="text-align: center; ">Elenco 
 
\t \t \t \t \t cataloghi 
 
\t \t \t \t \t </h2> 
 
\t \t \t \t \t <ul id="ulElencoCataloghi "></ul> 
 
\t \t \t \t </div>

一切都在eclipse崩潰之前就起作用了。發生了什麼事?

回答

1
  1. 清潔您proyect Eclipse的

  2. 編輯此行

    <input id="ddd" type="text"placeholder="Descrizione catalogo" onblur="ordinaItemCataloghi('dd')**"**> 
    

    <h2 data-dojo-type="dojox.mobile.RoundRectCategory" style="text-align: center;">Elenco cataloghi</h2> 
    
  3. requi再只:

    "dojox/mobile/RoundRect", 
    
+0

清理項目並添加雙引號後,它的工作原理。謝謝 – userA91

1

幾件事我注意到:

  1. 在你require()你有dojox/mobile/RoundRect後,一些奇怪的事情。那`n",不屬於我想的?

  2. 你沒有在你的require()

  3. 添加一個名爲dojox/mobile/RoundRectCategory模塊還可以發佈require()的回調?這可能是模塊名稱和回調參數位置之間的不匹配。沒有回調,很難找出(或消除這種可能性)。

+0

'N」,是粘貼和代碼的錯誤。我刪除dojox/mobile/RoundRectCategory,但無論如何不工作 – userA91

相關問題