PrimeFaces.widget.DataGrid=function(b,a){this.id=b;this.cfg=a;if(this.cfg.paginator){this.setupPaginator()}};PrimeFaces.widget.DataGrid.prototype.setupPaginator=function(){this.cfg.paginator.subscribe("changeRequest",this.handlePagination,null,this);this.cfg.paginator.render()};PrimeFaces.widget.DataGrid.prototype.handlePagination=function(c){var d={};d[PrimeFaces.PARTIAL_SOURCE_PARAM]=this.id;d[PrimeFaces.PARTIAL_REQUEST_PARAM]=true;d[PrimeFaces.PARTIAL_PROCESS_PARAM]=this.id;d[this.id+"_ajaxPaging"]=true;d[this.id+"_first"]=c.recordOffset;d[this.id+"_rows"]=c.rowsPerPage;d[this.id+"_page"]=c.page;var a=jQuery(PrimeFaces.escapeClientId(this.cfg.formId)).serialize();a=a+PrimeFaces.ajax.AjaxUtils.serialize(d);var b=this;jQuery.ajax({url:this.cfg.url,type:"POST",cache:false,dataType:"xml",data:a,success:function(i){var h=i.documentElement,f=h.getElementsByTagName("table")[0].firstChild.data,g=h.getElementsByTagName("state")[0].firstChild.data,e=PrimeFaces.escapeClientId(b.id+"_table");PrimeFaces.ajax.AjaxUtils.updateState(g);if(b.cfg.effect){jQuery(e).fadeOut(b.cfg.effectSpeed,function(){jQuery(e).replaceWith(f);jQuery(e).fadeIn(b.cfg.effectSpeed)})}else{jQuery(e).replaceWith(f)}b.cfg.paginator.setState(c)}})};
