EXT 分页

实现EXT分页的功能 现在又这句话{proxy:new Ext.data.HttpProxy({url:'bbar.jsp'}) 但是不知道该加在哪个位置 我把代码贴一下 大家帮看下 呵呵 谢谢啦
Ext.onReady(
function aaa(){
var storee=new Ext.data.SimpleStore({data:datee,fields:["lmbh","ljbh","ljmc","beizhu","lookBi","update","delete"]});//转换成EXT支持的数据类型
[color=red]var grid = new Ext.grid.GridPanel({ //创建一个表格[/color]renderTo:"hello",
title:"广西门户项目BI管理模块",
height:1230,
width:1030,

[color=red]bbar:new Ext.PagingToolbar({
pageSize:15,
store:storee,
displayInfo:true,
displayMsg:'显示第{0}条到第{1}条记录,一共两条',
emptyMsg:"没有记录"
}),[/color]

viewConfig:{forceFit:true},
columns:[

{header:"栏目编号",dataIndex:"lmbh",sortable:true},
{header:"链接编号",dataIndex:"ljbh",sortable:true},
{header:"链接名称",dataIndex:"ljmc"},
{header:"备注",dataIndex:"beizhu"},
{header:"查看BI",dataIndex:"lookBi",renderer:lookBi},
{header:"修改",dataIndex:"update"},
{header:"删除",dataIndex:"delete"}],
store:storee,

autoExpandColumn:3

});

storee.load(params:{start:0,limit:10}});

});

// create the Data Store
var store = new Ext.data.[color=red]JsonStore[/color]({
    root: 'topics',
    totalProperty: 'totalCount',
    idProperty: 'threadid',
    remoteSort: true,

    fields: [
        'title', 'forumtitle', 'forumid', 'author',
        {name: 'replycount', type: 'int'},
        {name: 'lastpost', mapping: 'lastpost', type: 'date', dateFormat: 'timestamp'},
        'lastposter', 'excerpt'
    ],

    // load using script tags for cross domain, if the data in on the same domain as
    // this page, an HttpProxy would be better
    [color=red]proxy[/color]: new Ext.data.ScriptTagProxy({
        url: 'http://extjs.com/forum/topics-browse-remote.php'
    })
});
store.setDefaultSort('lastpost', 'desc');

store 不能是 SimpleStore
要像上面这样的远程Store
在服务器端 bbar.jsp 做分页并传回JSON

SimpleStore 不支持HttpProxy,
PagingToolbar这个分页对SimpleStore无效。
不过听说官网有SimpleStore分页解决方法,你可以去找找。。。

看看例子代码
http://blog.csdn.net/dengjianli/archive/2009/05/04/4147976.aspx

怎么做一个分页的Grid
本例采用的是ScriptTagProxy,原因是 范例代码 和 服务端代码 不是在同一个服务器上(译注:即“跨域”),而大多数的情况是,在同一个服务器上得到数据,直接用HttpProxy就可以了。

使用DataStore与平时唯一不同的地方,便是需要设置totalProerty属性。本例中,我们从服务端的脚本计算出“total”这个值,告诉DataStore总共有多少个记录,这里指的是所有的记录数。

var ds = new Ext.data.Store({

    proxy: new Ext.data.ScriptTagProxy({
        url: 'http://www.vinylfox.com/yui-ext/examples/grid-paging/grid-paging-data.php'
    }),

    reader: new Ext.data.JsonReader({
        root: 'results',
        totalProperty: 'total',
        id: 'id'
    }, [
        {name: 'employee_name', mapping: 'name'},
        {name: 'job_title', mapping: 'title'},
        {name: 'hire_date', mapping: 'hire_date', type: 'date', dateFormat: 'm-d-Y'},
        {name: 'is_active', mapping: 'active'}
    ])

});