Please help me take a look at this ext coding,Why I could not get data from ds.jsp
Thanks a lot,
My computer with some problem and could not typing "han zi", Many thanksExt.onReady(function(){
var ds =new Ext.data.Store({
proxy : new Ext.data.HttpProxy({
url :'ds.jsp'
}),
reader :new Ext.data.JsonReader({
},[{name: 'company',mapping :'company'},
{name: 'price',mapping :'price'},
{name: 'change',mapping :'change'},
{name: 'pctChange',mapping :'pctChange'},
{name: 'lastChange',mapping :'lastChange'}
])
});
ds.load();
// create the Grid
var grid = new Ext.grid.GridPanel({
store: ds,
columns: [
{id:'company',header: "Company", width: 160, sortable: true, dataIndex: 'company'},
{header: "Price", width: 75, sortable: true, dataIndex: 'price'},
{header: "Change", width: 75, sortable: true, dataIndex: 'change'},
{header: "% Change", width: 75, sortable: true, dataIndex: 'pctChange'},
{header: "Last Updated", width: 85, sortable: true,dataIndex: 'lastChange'}
],
stripeRows: true,
autoExpandColumn: 'company',
height:350,
width:600,
title:'Array Grid',
pagesize:10
}); grid.render('grid-example');
});
ds.jsp code
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Insert title here</title>
</head>
<body>
<% String ds="[[company:'Alcoa Inc',price:29.01,change:0.42,pctChange:1.47,lastChange:'9/1 12:00am'}]]";
response.getWriter().write(ds);
%>
</body>
</html>
Thanks a lot,
My computer with some problem and could not typing "han zi", Many thanksExt.onReady(function(){
var ds =new Ext.data.Store({
proxy : new Ext.data.HttpProxy({
url :'ds.jsp'
}),
reader :new Ext.data.JsonReader({
},[{name: 'company',mapping :'company'},
{name: 'price',mapping :'price'},
{name: 'change',mapping :'change'},
{name: 'pctChange',mapping :'pctChange'},
{name: 'lastChange',mapping :'lastChange'}
])
});
ds.load();
// create the Grid
var grid = new Ext.grid.GridPanel({
store: ds,
columns: [
{id:'company',header: "Company", width: 160, sortable: true, dataIndex: 'company'},
{header: "Price", width: 75, sortable: true, dataIndex: 'price'},
{header: "Change", width: 75, sortable: true, dataIndex: 'change'},
{header: "% Change", width: 75, sortable: true, dataIndex: 'pctChange'},
{header: "Last Updated", width: 85, sortable: true,dataIndex: 'lastChange'}
],
stripeRows: true,
autoExpandColumn: 'company',
height:350,
width:600,
title:'Array Grid',
pagesize:10
}); grid.render('grid-example');
});
ds.jsp code
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Insert title here</title>
</head>
<body>
<% String ds="[[company:'Alcoa Inc',price:29.01,change:0.42,pctChange:1.47,lastChange:'9/1 12:00am'}]]";
response.getWriter().write(ds);
%>
</body>
</html>
解决方案 »
- 高手帮我!!!!!!myEclipse写的login.jsp页面提交后,login_ok出错,浏览器显示:无法显示该网页,但myeclipse的控制台却没错误。
- frameset的疑难杂症,请大家帮帮!多个frameset的问题,请高手出马!
- jquery easyui中demo?
- 如何在网页中加入一个链接,并使其可以从数据库的Blob字段中下载文件?
- 谁有将mysql数据库编码转换的过滤器,我的JSP页面是GBK的,但mysql数据库是ISO8859_1的,现在想用过滤器转换
- 在struts2中,界面数据进行运算,怎么做
- 日期和时间问题归类,高手都来讨论一下,给个方法。
- 紧急求救ldap用户验证的问题!!急急急(在线等,搞定就结贴)
- servlet怎么转向啊?
- win2000prefessional中哪里可以改内存设置???
- 求JAVA无组件上传文件的代码
- 由date类型引发的argument type mismatch异常怎么解决
别人看起来是很累的.!