John Eipe
John Eipe

Reputation: 11266

Error: Could not load class 'dijit/layout/ContentPane'

I'm using Dojo 1.6.1 on JSP pages.

<html>
<%@include file="includes/head.jsp" %>
<body class="tundra">
    <div 
        id="appLayout" 
        class="demoLayout" 
        data-dojo-type="dijit.layout.BorderContainer" 
        data-dojo-props="design: 'headline'"
        style="width: 100%; height: 100%">

    <div 
        class="edgePanel"
        data-dojo-type="dijit/layout/ContentPane" 
        data-dojo-props="region:'top'">

        <%@include file="includes/headline.jsp" %>

    </div>

    <div 
        class="edgePanel" 
        data-dojo-type="dijit.layout.ContentPane" 
        data-dojo-props="region: 'center'">
    .........

contents of head.jsp

<head>
<meta charset="utf-8">
    <link rel="stylesheet" href="<%=request.getContextPath()%>/dojo.1.6.1/dijit/themes/tundra/tundra.css">
    <link rel="stylesheet" href="<%=request.getContextPath()%>/dojo.1.6.1/dojo/resources/dojo.css">
    <link rel="stylesheet" href="<%=request.getContextPath()%>/css/main.css">
    <style type="text/css">
    </style>
<script src="<%=request.getContextPath()%>/dojo.1.6.1/dojo/dojo.js"
        djConfig="parseOnLoad: true, isDebug: true">
</script>
<script>
    dojo.require("dojo.parser");
    dojo.require("dijit.layout.BorderContainer");
    dojo.require("dijit.layout.ContentPane");
</script>
</head>

When deployed, I get javascript error. Could not load class 'dijit/layout/ContentPane' when inspected with firebug.

Upvotes: 0

Views: 1368

Answers (1)

ssedano
ssedano

Reputation: 8452

Seems that dijit.layout.ContentPane is not in the classpath. Try to add it or try to change the require for a define to see if fix.

Here is the example.

Upvotes: 1

Related Questions