- 爱易网页
-
Java教程
- 异常: Could not load 'dojox.grid.Grid' last tried '/dojox/grid/Grid.js'
日期:2014-05-17 浏览次数:20688 次
错误: Could not load 'dojox.grid.Grid'; last tried '../dojox/grid/Grid.js'
错误: Could not load 'dojox.grid.Grid'; last tried '../dojox/grid/Grid.js'
代码:
<%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>My JSP 'grid.jsp' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
<style type="text/css">
@import "dojoroot/dijit/themes/tundra/tundra.css";
@import "dojoroot/dojo/resource/dojo.css";
@import "dojoroot/dojox/grid/_grid/tundraGrid.css";
</style>
<script type="text/javascript" src="dojoroot/dojo/dojo.js.uncompressed.js" djConfig="parseOnLoad:true"></script>
<script type="text/javascript">
dojo.require("dojo.parser");
dojo.require("dojo.data.ItemFileReadStore");
dojo.require("dojox.grid.Grid");
</script>
<style type="text/css">
#grid{
border:1px solid #333;
width:550px;
margin:10px;
height:200px;
font-size:0.9em;
}
</style>
</head>
<body class="tundra">
<div dojoType="dojo.data.ItemFileReadStore" jsId="wishstore" url="json.json"></div>
<table id="grid" dojoType="dojox.grid.Grid" store="wishstore" query="{wishId:'*'}"
clientSort="true">
<tr>
<th field="description">description</th>
<th field="size">size</th>
<th field="origin">origin</th>
<th field="wrapper">wrapper</th>
<th field="shape">shape</th>
</tr>
</table>
</body>
</html>