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

Popular posts from this blog

smart gwt allow only numbers in textfield

how to access the DOM gwt smartclient

question confirm sc window smartgwt - ventana de confirmacion en smartgwt