Changeset 4949

Show
Ignore:
Timestamp:
06/24/08 14:21:11 (5 months ago)
Author:
marc.englund@…
Message:

Table now refreshes explicitly when adding and removing stuff and the contained does not implement the appropriate notifier interface. Fixes #1461.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/com/itmill/toolkit/ui/Table.java

    r4911 r4949  
    14501450        } 
    14511451 
     1452        if (!(items instanceof Container.ItemSetChangeNotifier)) { 
     1453            resetPageBuffer(); 
     1454            refreshRenderedCells(); 
     1455        } 
     1456 
    14521457        return itemId; 
    14531458    } 
     
    21932198            currentPageFirstItemId = nextItemId; 
    21942199        } 
     2200        if (!(items instanceof Container.ItemSetChangeNotifier)) { 
     2201            resetPageBuffer(); 
     2202            refreshRenderedCells(); 
     2203        } 
    21952204        return ret; 
    21962205    } 
     
    22392248            } 
    22402249            return false; 
     2250        } 
     2251        if (!(items instanceof Container.PropertySetChangeNotifier)) { 
     2252            resetPageBuffer(); 
     2253            refreshRenderedCells(); 
    22412254        } 
    22422255        return true; 
     
    24802493    public Object addItemAfter(Object previousItemId) 
    24812494            throws UnsupportedOperationException { 
    2482         return ((Container.Ordered) items).addItemAfter(previousItemId); 
     2495        Object itemId = ((Container.Ordered) items) 
     2496                .addItemAfter(previousItemId); 
     2497        if (!(items instanceof Container.ItemSetChangeNotifier)) { 
     2498            resetPageBuffer(); 
     2499            refreshRenderedCells(); 
     2500        } 
     2501        return itemId; 
    24832502    } 
    24842503 
     
    24912510    public Item addItemAfter(Object previousItemId, Object newItemId) 
    24922511            throws UnsupportedOperationException { 
    2493         return ((Container.Ordered) items).addItemAfter(previousItemId, 
     2512        Item item = ((Container.Ordered) items).addItemAfter(previousItemId, 
    24942513                newItemId); 
     2514        if (!(items instanceof Container.ItemSetChangeNotifier)) { 
     2515            resetPageBuffer(); 
     2516            refreshRenderedCells(); 
     2517        } 
     2518        return item; 
    24952519    } 
    24962520