我使用Worklight 5.06和Dojo 1.8。 Eclipse崩溃后,它会在浏览器控制台上显示此错误:
正如您在此屏幕截图中看到的:
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>
在日食崩溃之前,一切都在起作用。可能发生了什么?
答案 0 :(得分:1)
我注意到的一些事情:
在require()
dojox/mobile/RoundRect
之后,你有一些奇怪的事情。我认为那`n",
不属于那里?
您未在dojox/mobile/RoundRectCategory
require()
的模块
您还可以发布require()
的回调吗?它可能是模块名称与回调中参数位置之间的不匹配。如果没有回调,很难找到(或消除这种可能性)。
答案 1 :(得分:1)
清理您的Eclipse上的项目
编辑此行
<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>
仅需要:
"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">