Changeset 5278

Show
Ignore:
Timestamp:
08/27/08 12:41:19 (3 months ago)
Author:
matti.tahvonen@…
Message:

fixes #1943, recalculate columns widths when table rows change from 0

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/com/itmill/toolkit/terminal/gwt/client/ui/IScrollTable.java

    r5274 r5278  
    157157        final int newTotalRows = uidl.getIntAttribute("totalrows"); 
    158158        if (newTotalRows != totalRows) { 
    159             totalRows = newTotalRows; 
    160159            if (tBody != null) { 
     160                if (totalRows == 0) { 
     161                    tHead.clear(); 
     162                } 
    161163                initializedAndAttached = false; 
    162164                initialContentReceived = false; 
    163165                isNewBody = true; 
    164166            } 
     167            totalRows = newTotalRows; 
    165168        } 
    166169 
     
    12741277        } 
    12751278 
     1279        public void clear() { 
     1280            super.clear(); 
     1281            availableCells.clear(); 
     1282            availableCells.put("0", new RowHeadersHeaderCell()); 
     1283 
     1284        } 
     1285 
    12761286        public void updateCellsFromUIDL(UIDL uidl) { 
    12771287            Iterator it = uidl.getChildIterator();