Clean your proyect on Eclipse
edit this row
<input id="ddd" type="text"placeholder="Descrizione catalogo" onblur="ordinaItemCataloghi('dd')**"**>
and
<h2 data-dojo-type="dojox.mobile.RoundRectCategory" style="text-align: center;">Elenco cataloghi</h2>
require only:
"dojox/mobile/RoundRect",
Unable to resolve constructor for: ' dojox.mobile.RoundRectCategory'
-
04-06-2022 - |
質問
I use Worklight 5.06 and Dojo 1.8. After an Eclipse crash it shows this errors on browser's console:
- Unable to resolve constructor for: 'dojox.mobile.RoundRectCategory'
- Left list not found
- this.leftList is indefined
As you can see in this screenshot:
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>
everything worked up before the crash of eclipse. What could have happened?
解決
他のヒント
Few things I notice:
In your
require()
you have some weird thing afterdojox/mobile/RoundRect
. That`n",
doesn't belong there I suppose?You didn't add a module called
dojox/mobile/RoundRectCategory
in yourrequire()
Can you also post the callback of the
require()
? It's probably a mismatch between the name of the module and the position of the parameter in the callback. Without callback it's hard to find out (or to eliminate this possibility).
I got similar error with a Dojox DataGrid and migrating from 1.8 to 1.10. in my case it turned out the dot notation required to be changed to slash notation:
<!-- Change syntax from: -->
<table id="resultsUsers" data-dojo-type="dojox.grid.DataGrid">
<!-- Change syntax to: -->
<table id="resultsUsers" data-dojo-type="dojox/grid/DataGrid">