日期:2014-05-17  浏览次数:20782 次

EXTJS4.0表单分页的错误
本帖最后由 lenj520 于 2013-09-03 16:13:43 编辑
JSON:
{totalProperty:59,
root:[
{"mms_create_time":null,"mms_moban_create_user":"","mms_moban_id":1,"mms_moban_name":"测试模板","mms_moban_type":""},
{"mms_create_time":null,"mms_moban_create_user":"","mms_moban_id":2,"mms_moban_name":"测试模板","mms_moban_type":""},
{"mms_create_time":null,"mms_moban_create_user":"","mms_moban_id":3,"mms_moban_name":"模板1","mms_moban_type":""},
{"mms_create_time":null,"mms_moban_create_user":"","mms_moban_id":4,"mms_moban_name":"模板测试","mms_moban_type":""},
{"mms_create_time":null,"mms_moban_create_user":"","mms_moban_id":5,"mms_moban_name":"测试模板","mms_moban_type":""},
{"mms_create_time":null,"mms_moban_create_user":"","mms_moban_id":6,"mms_moban_name":"圣诞快乐","mms_moban_type":""},
{"mms_create_time":null,"mms_moban_create_user":"","mms_moban_id":7,"mms_moban_name":"测试模板","mms_moban_type":""},
{"mms_create_time":null,"mms_moban_create_user":"","mms_moban_id":8,"mms_moban_name":"测试模板","mms_moban_type":""},
{"mms_create_time":null,"mms_moban_create_user":"","mms_moban_id":9,"mms_moban_name":"测试模板","mms_moban_type":""},
{"mms_create_time":null,"mms_moban_create_user":"","mms_moban_id":10,"mms_moban_name":"测试模板","mms_moban_type":""}]}

JSP页面:
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <link rel="stylesheet" type="text/css" href="./ext-4.0/resources/css/ext-all.css" />
  <script type="text/javascript" src="./ext-4.0/bootstrap.js"></script>
   <script type="text/javascript" src="./ext-4.0/locale/ext-lang-zh_CN.js"></script>
<script type="text/javascript">
Ext.onReady(function(){
var itemsPerPage = 10;//指定分页大小
   
var store = Ext.create('Ext.data.Store', {
    autoLoad: {start: 0, limit: itemsPerPage},
    fileds:['mms_create_time','mms_moban_create_user','mms_moban_id','mms_moban_name','mms_moban_type'],
    pageSize: itemsPerPage, //设置分页大小
    proxy : {
        type: 'ajax',
        url: './mmsTelate.action',  //请求的服务器地址
        reader: {
            type:'json',