码迷,mamicode.com
首页 > Web开发 > 详细

ExtJS4.2 Grid 分页栏 搜索

时间:2014-05-01 15:36:22      阅读:414      评论:0      收藏:0      [点我收藏+]

标签:des   style   blog   class   code   java   tar   ext   javascript   color   get   

mamicode.com,码迷
function SearchCondition(){
        this.startTime = "";
        this.endTime = "";
        this.targetInfo = "";
        this.logType = "";
        this.manager = "";
        this.reset = function(){
            this.startTime = "";
            this.endTime = "";
            this.targetInfo = "";
            this.logType = "";
            this.manager = "";
        }
    } 
    
var logStore = Ext.create("Ext.data.Store", {
        pageSize : 30,
        searchCondition:new SearchCondition(),
        model : ‘opearationLogModel‘,
        proxy:{
            type : ‘ajax‘,
            url:"********",
            reader:{
                root: ‘***‘,
                totalProperty: ‘***‘,
                type : ‘json‘
            }
        },
        remoteSort:true,
        listeners:{
             ‘beforeload‘: function( s, operation, eOpts ){
                 s.proxy.extraParams= {
                         startTime: logStore.searchCondition.startTime, 
                         endTime: logStore.searchCondition.endTime,
                         targetInfo: logStore.searchCondition.targetInfo, 
                         logType: logStore.searchCondition.logType, 
                         manager: logStore.searchCondition.manager
                     };
             },
            ‘load‘: function( s, records, successful, eOpts ){
            }
         }
    });

logStore.sort({property:‘operateTime‘, direction:‘DESC‘});

function querybtnClk(){         
         logStore.searchCondition.reset();
         logStore.searchCondition.startTime = startTime;
         logStore.searchCondition.endTime = endTime;
         logStore.searchCondition.targetInfo = ***;
         logStore.searchCondition.logType = ****;
         logStore.searchCondition.manager = ***;
         
         barPagingBar.bind(logStore);
         barPagingBar.doRefresh();
    }
mamicode.com,码迷

 

ExtJS4.2 Grid 分页栏 搜索,码迷,mamicode.com

ExtJS4.2 Grid 分页栏 搜索

标签:des   style   blog   class   code   java   tar   ext   javascript   color   get   

原文地址:http://www.cnblogs.com/qingbin-bai/p/3700785.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!