Posts

Showing posts from March, 2013

addDataChangedHandler addDataArrivedHandler

        this.grid = listGrid;         this.ds      = (PagerDataSource) listGrid.getDataSource();                 ResultSet dataProperties = new ResultSet();          dataProperties.addDataChangedHandler(new DataChangedHandler() {                    @Override             public void onDataChanged(DataChangedEvent event) {                 System.out.println(" onDataChanged" );                                 RecordList data = grid.getDataAsRecordList();                             if (data != null && data instanceof ResultSet && ((ResultSet)data).lengthIsKnown() && data.getLength() > 0) {                      totalsLabel.setContents(  new Integer(ds.getTotalRows()).toString()   + " Records");                     System.out.println(" Total paginas  :" + new Integer(ds.getTotalPages()).toString() );                     System.out.println(" numero de  pagina :"+ new Integer(ds.getCurrentPage()).toString() );