无法解析构造函数:'dojox.mobile.RoundRectCategory'

时间:2013-07-25 15:37:39

标签: html dojo ibm-mobilefirst dojox.mobile

我使用Worklight 5.06和Dojo 1.8。 Eclipse崩溃后,它会在浏览器控制台上显示此错误:

  1. 无法解析构造函数:'dojox.mobile.RoundRectCategory'
  2. 找不到左列表
  3. this.leftList is indefined
  4. 正如您在此屏幕截图中看到的: 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 ",
        	          "
              dojox / mobile / Button ",
        	          "
              dojox / mobile / GridLayout ",
        	          "
              dojox / mobile / Pane ",
        	          "
              dojox / mobile / ScrollablePane ",
        	          "
              dijit / form / DataList ",
    
        	          ],);
     @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')> 
    					<input id=" linea_prodotto " type="text " placeholder="Linea prodotto "
    						onblur="ordinaItemCataloghi( 'll') ">
    				</div>
    			</div>		
    			<h2 data-dojo-type=" dojox.mobile.RoundRectCategory "
    				style="text-align: center; ">Elenco
    					cataloghi
    					</h2>
    					<ul id="ulElencoCataloghi "></ul>
    				</div>

    在日食崩溃之前,一切都在起作用。可能发生了什么?

3 个答案:

答案 0 :(得分:1)

我注意到的一些事情:

  1. require() dojox/mobile/RoundRect之后,你有一些奇怪的事情。我认为那`n",不属于那里?

  2. 您未在dojox/mobile/RoundRectCategory

  3. 中添加名为require()的模块
  4. 您还可以发布require()的回调吗?它可能是模块名称与回调中参数位置之间的不匹配。如果没有回调,很难找到(或消除这种可能性)。

答案 1 :(得分:1)

  1. 清理您的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. 仅需要:

    "dojox/mobile/RoundRect",
    

答案 2 :(得分:0)

我在使用Dojox DataGrid并从1.8迁移到1.10时遇到了类似的错误。就我而言,原来需要将点符号更改为斜杠符号:

<!-- Change syntax from: -->
<table id="resultsUsers" data-dojo-type="dojox.grid.DataGrid">

<!-- Change syntax to: -->
<table id="resultsUsers" data-dojo-type="dojox/grid/DataGrid">