相关文章
更多最近更新
更多ext2.2分页出现脚本错误,等待受教!
2019-03-25 13:48|来源: 网路
脚本提示为:
行:11
字符:12246
代码:0
错误:系统错误: -1072896658。
网址:http://localhost:8088/Test/paging.jsp
源码为:
<%@ page language="java" pageEncoding="utf8"%>
<%
String start = request.getParameter("start");
String limit = request.getParameter("limit");
try {
int index = Integer.parseInt(start);
int pageSize = Integer.parseInt(limit);
String json = "{totalProperty:100,root:[\n";
for (int i = index; i < pageSize + index; i++) {
json += "{id:" + i + ",name:'name" + i + "',descn:'descn" + i + "'}";
if (i != pageSize + index - 1) {
json += ",\n";
}
}
json += "]}";
response.getWriter().write(json);
System.out.println(json);
} catch(Exception ex) {
}
%>
<html>
<head>
<title>paging.jsp</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="ext/resources/css/ext-all.css" />
<script type="text/javascript" src="ext/ext-base.js"></script>
<script type="text/javascript" src="ext/ext-all.js"></script>
<script type="text/javascript" src="ext/ext-lang-zh_CN.js"></script>
<script type="text/javascript" src="ext/examples.js"></script>
</head>
<script language="javascript">
Ext.onReady(function(){
var cm = new Ext.grid.ColumnModel([
{header:'编号',dataIndex:'id'},
{header:'名称',dataIndex:'name'},
{header:'描述',dataIndex:'descn'}
]);
var ds = new Ext.data.Store({
proxy: new Ext.data.HttpProxy({url:"paging.jsp"}),
reader: new Ext.data.JsonReader({totalProperty: 'totalProperty',root: 'root'}, [
{name: 'id'},
{name: 'name'},
{name: 'descn'}
])
});
var grid = new Ext.grid.GridPanel({
el: 'grid',
ds: ds,
cm: cm,
tbar: new Ext.PagingToolbar({
pageSize: 5,
store: ds,
displayInfo: true,
displayMsg: '显示第 {0} 条到 {1} 条记录,一共 {2} 条',
emptyMsg: "没有记录"
}),
bbar: new Ext.PagingToolbar({
pageSize: 5,
store: ds,
displayInfo: true,
displayMsg: '显示第 {0} 条到 {1} 条记录,一共 {2} 条',
emptyMsg: "没有记录"
}),
height:250,
width:600,
title:'Array Grid'
});
grid.render();
ds.load({params:{start:0,limit:10}});
})
</script>
<body>
<div style="height:200px;" id="grid"></div>
</body>
</html>
请问怎么解决!!
行:11
字符:12246
代码:0
错误:系统错误: -1072896658。
网址:http://localhost:8088/Test/paging.jsp
源码为:
<%@ page language="java" pageEncoding="utf8"%>
<%
String start = request.getParameter("start");
String limit = request.getParameter("limit");
try {
int index = Integer.parseInt(start);
int pageSize = Integer.parseInt(limit);
String json = "{totalProperty:100,root:[\n";
for (int i = index; i < pageSize + index; i++) {
json += "{id:" + i + ",name:'name" + i + "',descn:'descn" + i + "'}";
if (i != pageSize + index - 1) {
json += ",\n";
}
}
json += "]}";
response.getWriter().write(json);
System.out.println(json);
} catch(Exception ex) {
}
%>
<html>
<head>
<title>paging.jsp</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="ext/resources/css/ext-all.css" />
<script type="text/javascript" src="ext/ext-base.js"></script>
<script type="text/javascript" src="ext/ext-all.js"></script>
<script type="text/javascript" src="ext/ext-lang-zh_CN.js"></script>
<script type="text/javascript" src="ext/examples.js"></script>
</head>
<script language="javascript">
Ext.onReady(function(){
var cm = new Ext.grid.ColumnModel([
{header:'编号',dataIndex:'id'},
{header:'名称',dataIndex:'name'},
{header:'描述',dataIndex:'descn'}
]);
var ds = new Ext.data.Store({
proxy: new Ext.data.HttpProxy({url:"paging.jsp"}),
reader: new Ext.data.JsonReader({totalProperty: 'totalProperty',root: 'root'}, [
{name: 'id'},
{name: 'name'},
{name: 'descn'}
])
});
var grid = new Ext.grid.GridPanel({
el: 'grid',
ds: ds,
cm: cm,
tbar: new Ext.PagingToolbar({
pageSize: 5,
store: ds,
displayInfo: true,
displayMsg: '显示第 {0} 条到 {1} 条记录,一共 {2} 条',
emptyMsg: "没有记录"
}),
bbar: new Ext.PagingToolbar({
pageSize: 5,
store: ds,
displayInfo: true,
displayMsg: '显示第 {0} 条到 {1} 条记录,一共 {2} 条',
emptyMsg: "没有记录"
}),
height:250,
width:600,
title:'Array Grid'
});
grid.render();
ds.load({params:{start:0,limit:10}});
})
</script>
<body>
<div style="height:200px;" id="grid"></div>
</body>
</html>
请问怎么解决!!
相关问答
更多-
通过在C#提供以下代码找到解决方案 PagingToolbar1.PageSize = 25; PagingToolbar1.PageIndex = 1; Found the Solution by Providing the Following code in C# PagingToolbar1.PageSize = 25; PagingToolbar1.PageIndex = 1;
-
Paginator::setViewName() Paginator门面映射到Illuminate \ Pagination \ Environment 。 分页服务提供程序使用此确切方法在配置文件中指定视图名称,因此只需使用它来覆盖配置默认值。 Paginator::setViewName() The Paginator facade maps to Illuminate\Pagination\Environment. The pagination service provider uses this e ...
-
在您的Controller_User_Account和HTML类中: 更换Laravel目前仅适用于bootstrap 2的分页,但您现在可以使用解决方法,直到支持bootstrap 3。 首先通过在“app / views / pagination.php”创建一个新文件来创建一个将使用bootstrap 3的分页语法的视图 应用/视图/ pagination.php
与MVC 4分页的问题(Issue with Pagination with MVC 4)[2023-08-03]
您需要将UserListModel转换为IPagedList,而不是它的内部userModel属性。 您的视图期望IPagedList不是IPagedList Solved my Problem with following steps: Model public class UserListModel { public IEnumerableddlDept { get; set; } public PagedList.IPagedList< ... 这可能是因为您打算将服务器上的Web根目录设置为公用文件夹(并且Laravel假定就是这种情况)。 实际上,您的Web根目录设置为public文件夹上方的两个级别,因此当Laravel尝试重定向到/displays?page=2它会尝试将您发送到错误的文件夹。 This is likely because you're meant to set the web root on your server to the public folder (and Laravel assumes that that's ...这有点晚了,但是。 您可以使用以下内容而不是使用查询工具: ForumPostsCollection posts = new ForumPostsCollection().Where(ForumPosts.Columns.ThreadId,1).Load(); 您可以使用任意数量的参数,只需重复where子句,如: ForumPostsCollection posts = new ForumPostsCollection().Where(ForumPosts.Columns.ThreadId,1).Whe ...SSRS 2005分页(SSRS 2005 paging)[2022-06-18]
您可以根据页面大小控制它。 请参阅msdn上的这篇文章 。 报表生成器应自动为您执行分页。 如果要在visual studio中构建报表,则应在“属性”窗口的“布局”部分中看到“InteractiveSize”和“PageSize”属性。 You can control that by the size of your page. See this article at msdn. The report builder should do paging automatically for you. If y ...改变这些 $config['base_url'] = base_url().'gallery'; $config['uri_segment'] = '1'; if($this->uri->segment(1)) { $page = ($this->uri->segment(1)) ; } 您的准则中存在冲突 $config['uri_segment'] = '4'; 和 if($this->uri->segment(2)) { $page = ($this->uri->segment(2 ...laravel 5分页问题5(laravel 5 pagination issue 5)[2023-04-16]
这是我的回答 searchController.php public function search(Request $Request) { $results = Mod_ads::where(function($query){ $ins_brand = Input::has('ins_brand')? Input::get('ins_brand'):null; $min_price = Input::has('min_price')? Input::get('mi ...