Question

I use Worklight 5.06 and Dojo 1.8. After an Eclipse crash it shows this errors on browser's console:

  1. Unable to resolve constructor for: 'dojox.mobile.RoundRectCategory'
  2. Left list not found
  3. this.leftList is indefined

As you can see in this screenshot: 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>

everything worked up before the crash of eclipse. What could have happened?

Was it helpful?

Solution

  1. Clean your proyect on Eclipse

  2. 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>
    
  3. require only:

    "dojox/mobile/RoundRect",
    

OTHER TIPS

Few things I notice:

  1. In your require() you have some weird thing after dojox/mobile/RoundRect. That `n", doesn't belong there I suppose?

  2. You didn't add a module called dojox/mobile/RoundRectCategory in your require()

  3. 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">
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top