aboutsummaryrefslogtreecommitdiffstats
path: root/src/com/itmill/toolkit/ui/Table.java
diff options
context:
space:
mode:
authorMarc Englund <marc.englund@itmill.com>2008-06-24 14:21:11 +0000
committerMarc Englund <marc.englund@itmill.com>2008-06-24 14:21:11 +0000
commit58bd42bd8a399dfc414f18f44a93a32b7c00fe5b (patch)
tree569722b63af9da94722bcdd621546e9aee846471 /src/com/itmill/toolkit/ui/Table.java
parent095c8b6bbe04753595845a09ea80fda4f5c66490 (diff)
downloadvaadin-framework-58bd42bd8a399dfc414f18f44a93a32b7c00fe5b.tar.gz
vaadin-framework-58bd42bd8a399dfc414f18f44a93a32b7c00fe5b.zip
Table now refreshes explicitly when adding and removing stuff and the contained does not implement the appropriate notifier interface. Fixes #1461.
svn changeset:4949/svn branch:trunk
Diffstat (limited to 'src/com/itmill/toolkit/ui/Table.java')
-rw-r--r--src/com/itmill/toolkit/ui/Table.java28
1 files changed, 26 insertions, 2 deletions
diff --git a/src/com/itmill/toolkit/ui/Table.java b/src/com/itmill/toolkit/ui/Table.java
index 0e46e74e88..e914584460 100644
--- a/src/com/itmill/toolkit/ui/Table.java
+++ b/src/com/itmill/toolkit/ui/Table.java
@@ -1449,6 +1449,11 @@ public class Table extends AbstractSelect implements Action.Container,
item.getItemProperty(cols[i]).setValue(cells[i]);
}
+ if (!(items instanceof Container.ItemSetChangeNotifier)) {
+ resetPageBuffer();
+ refreshRenderedCells();
+ }
+
return itemId;
}
@@ -2192,6 +2197,10 @@ public class Table extends AbstractSelect implements Action.Container,
if (ret && (itemId != null) && (itemId.equals(currentPageFirstItemId))) {
currentPageFirstItemId = nextItemId;
}
+ if (!(items instanceof Container.ItemSetChangeNotifier)) {
+ resetPageBuffer();
+ refreshRenderedCells();
+ }
return ret;
}
@@ -2239,6 +2248,10 @@ public class Table extends AbstractSelect implements Action.Container,
}
return false;
}
+ if (!(items instanceof Container.PropertySetChangeNotifier)) {
+ resetPageBuffer();
+ refreshRenderedCells();
+ }
return true;
}
@@ -2479,7 +2492,13 @@ public class Table extends AbstractSelect implements Action.Container,
*/
public Object addItemAfter(Object previousItemId)
throws UnsupportedOperationException {
- return ((Container.Ordered) items).addItemAfter(previousItemId);
+ Object itemId = ((Container.Ordered) items)
+ .addItemAfter(previousItemId);
+ if (!(items instanceof Container.ItemSetChangeNotifier)) {
+ resetPageBuffer();
+ refreshRenderedCells();
+ }
+ return itemId;
}
/**
@@ -2490,8 +2509,13 @@ public class Table extends AbstractSelect implements Action.Container,
*/
public Item addItemAfter(Object previousItemId, Object newItemId)
throws UnsupportedOperationException {
- return ((Container.Ordered) items).addItemAfter(previousItemId,
+ Item item = ((Container.Ordered) items).addItemAfter(previousItemId,
newItemId);
+ if (!(items instanceof Container.ItemSetChangeNotifier)) {
+ resetPageBuffer();
+ refreshRenderedCells();
+ }
+ return item;
}
/**