Chrome issue : Enable/Disable sorting on columns fails in chrome in GWT -


i using celltable gwt. when user click on column header sort, disable sorting untill data retrieved. this, using following code:

private void setheaderssortable(boolean enable) {   if (_table.getcolumncount() > 0) {      if (enable) {         // enable columns specified in _sortpropertybycolumn         iterator<column<t, ?>> sortablecolsiter = _sortpropertybycolumn.keyset().iterator();         while (sortablecolsiter.hasnext()) {            sortablecolsiter.next().setsortable(enable);         }      } else {         // disable columns         (int = 0; < _table.getcolumncount(); i++) {            _table.getcolumn(i).setsortable(enable);         }      }      _table.redrawheaders();   } 

}

this works fine in firefox , ie not in chrome.

it seems in chrome, fails in _table.redrawheaders(). call fails in gwt class abstracthasdata throws indexoutofboundsexception

protected void checkrowbounds(int row) {     if (!isrowwithinbounds(row)) {         throw new indexoutofboundsexception("row index: " + row + ", row size: " +      getrowcount());      }   }  protected boolean isrowwithinbounds(int row) {      return row >= 0 && row < presenter.getvisibleitemcount(); } 

the issue resolved deferring redrawheaders() call

scheduler.get().scheduledeferred(new scheduledcommand() {         @override         public void execute() {            _table.redrawheaders();         }      });   }  

Comments

Popular posts from this blog

c++ - Creating new partition disk winapi -

Android Prevent Bluetooth Pairing Dialog -

VBA function to include CDATA -