gpt4 book ai didi

java - 错误: Could not load class 'dijit/layout/ContentPane'

转载 作者:行者123 更新时间:2023-12-01 14:58:20 24 4
gpt4 key购买 nike

我在 JSP 页面上使用 Dojo 1.6.1。

<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'">
.........

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>

部署后,我收到 JavaScript 错误。无法加载类“dijit/layout/ContentPane”当用 Firebug 检查时。

最佳答案

似乎 dijit.layout.ContentPane 不在类路径中。尝试添加它或尝试将 require 更改为 define 以查看是否修复。

Here就是这个例子。

关于java - 错误: Could not load class 'dijit/layout/ContentPane' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14052672/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com