| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- /*!
- * Ext JS Library 3.0.0
- * Copyright(c) 2006-2009 Ext JS, LLC
- * licensing@extjs.com
- * http://www.extjs.com/license
- */
- Ext.onReady(function(){
- // create the Data Store
- var store = new Ext.data.JsonStore({
- root: 'data',
- totalProperty: 'totalCount',
- idProperty: 'threadid',
- remoteSort: true,
- fields: [
- 'task','workflow' ],
- // load using script tags for cross domain, if the data in on the same domain as
- // this page, an HttpProxy would be better
- proxy: new Ext.data.HttpProxy({
- url: '/ynet/PagingTest.do'
- })
- });
-
- // pluggable renders
- function renderTopic(value, p, record){
-
- return ("aaa")
- }
-
- var grid = new Ext.grid.GridPanel({
- width:700,
- height:500,
- title:'ExtJS.com - Browse Forums',
- store: store,
- trackMouseOver:false,
- disableSelection:true,
- loadMask: true,
- // grid columns
- columns:[{
- id: 'topic', // id assigned so we can apply custom css (e.g. .x-grid-col-topic b { color:#333 })
- header: "task",
- dataIndex: 'task',
- width: 420,
- renderer: renderTopic,
- sortable: true
- },{
- header: "workflow",
- dataIndex: 'workflow',
- width: 100,
- sortable: true
- }],
-
- // paging bar on the bottom
- bbar: new Ext.PagingToolbar({
- pageSize: 25,
- store: store,
- displayInfo: true,
- displayMsg: 'Displaying topics {0} - {1} of {2}',
- emptyMsg: "ûÓмǼ"
-
- })
- });
- // render it
- grid.render('grid');
- // trigger the data store load
- store.load({params:{start:0, limit:25}});
- });
|