Wtf.data.PagingMemoryProxy=function(B,A){Wtf.data.PagingMemoryProxy.superclass.constructor.call(this);this.data=B;Wtf.apply(this,A)};Wtf.extend(Wtf.data.PagingMemoryProxy,Wtf.data.MemoryProxy,{customFilter:null,initComponent:function(A){this.addEvents({"pagechange":true})},load:function(C,A,G,J,I){C=C||{};var F;try{F=A.readRecords(this.data)}catch(D){this.fireEvent("loadexception",this,I,null,D);G.call(J,null,I,false);return }if(this.customFilter!=null){F.records=F.records.filter(this.customFilter);F.totalRecords=F.records.length}else{if(C.filter!==undefined){F.records=F.records.filter(function(L){if(typeof (L)=="object"){var K=C.filterCol||0;return String(L.data[K]).match(C.filter)?true:false}else{return String(L).match(C.filter)?true:false}});F.totalRecords=F.records.length}}if(C.sort!==undefined){var B=String(C.dir).toUpperCase()=="DESC"?-1:1;var E=function(L,K){return L==K?0:L<K?-1:1};var H=A.recordType.getField(C.sort).sortType;F.records.sort(function(L,K){var M=0;if(typeof (L)=="object"){M=E(H(L.data[C.sort]),H(K.data[C.sort]))*B}else{M=E(L,K)*B}if(M==0){M=(L.index<K.index?-1:1)}return M})}if(C.start!==undefined&&C.limit!==undefined){F.records=F.records.slice(C.start,C.start+C.limit)}G.call(J,F,I,true);this.fireEvent("pagechange",this.id,C.start,C.limit)}})