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() );
System.out.println(" rows en esta pagina :" + new Integer(ds.getTotalRows()).toString() );
System.out.println(" Start row :" + new Integer(ds.getStartRow()).toString() );
System.out.println(" End row :" + new Integer(ds.getEndRow()).toString() );
}
}
});
grid.setDataProperties(dataProperties);
/*listGrid.addDataArrivedHandler(new DataArrivedHandler() {
@Override
public void onDataArrived(DataArrivedEvent event) {
System.out.println(" onDataArrived" );
}
});
System.out.println(" Paginator f" );
*/
Comments
Post a Comment