Reputation: 99
I'm new to dojo, so I followed an example: http://livedocs.dojotoolkit.org/dijit/layout
This works fine ...
Now if I use the src 1.7.2 that I've downloaded on my domino server, I get an error: Could not load class 'dijit/layout/BorderContainer
If I look with firebug, the dojo.js loads along with others .js ans .css files.
I cannot understand why it does not work ...
The HTML file is at the root of the server and contains the following code:
<!DOCTYPE html>
<html >
<head>
<link rel="stylesheet" href="./dojo-release-1.7.2-src/dijit/themes/claro/claro.css">
<script src='./dojo-release-1.7.2-src/dojo/dojo.js' data-dojo-config='parseOnLoad: true'></script>
<script>require(["dojo/parser", "dijit/layout/BorderContainer", "dijit/layout/TabContainer", "dijit/layout/AccordionContainer", "dijit/layout/ContentPane", "dijit/layout/AccordionPane"]);</script>
</head>
<body class="claro">
<div data-dojo-type="dijit/layout/BorderContainer" style="width: 100%; height: 100%;">
<div data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region:'top'">Top pane</div>
<div data-dojo-type="dijit/layout/AccordionContainer" data-dojo-props="region:'leading'">
<div data-dojo-type="dijit/layout/AccordionPane" title="pane #1">accordion pane #1</div>
<div data-dojo-type="dijit/layout/AccordionPane" title="pane #2">accordion pane #2</div>
<div data-dojo-type="dijit/layout/AccordionPane" title="pane #3">accordion pane #3</div>
</div>
<div data-dojo-type="dijit/layout/TabContainer" data-dojo-props="region:'center'">
<div data-dojo-type="dijit/layout/ContentPane" title="tab #1">tab pane #1</div>
<div data-dojo-type="dijit/layout/ContentPane" title="tab #2">tab pane #2</div>
<div data-dojo-type="dijit/layout/ContentPane" title="tab #3">tab pane #3</div>
</div>
<div data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region:'trailing'">Trailing pane</div>
<div data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region:'bottom'">Bottom pane</div>
</div>
</body>
</html>
It's pretty sure I've missed somenting... all help welcome :)
Upvotes: 2
Views: 1803
Reputation: 8162
The require statement uses slashes, but the markup should use periods.
Change throughout your example.
<div data-dojo-type="dijit/layout/BorderContainer"
should be
<div data-dojo-type="dijit.layout.BorderContainer"
Upvotes: 4