summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonatan Kronqvist <jonatan.kronqvist@itmill.com>2011-10-20 07:41:11 +0000
committerJonatan Kronqvist <jonatan.kronqvist@itmill.com>2011-10-20 07:41:11 +0000
commit26a969ecadc126936b5886cc45751b83e67e8175 (patch)
tree3a6f2f10b00f2982cbc6e27d60ec85874ed244a7
parent2499160e4a9a2f8c267ac54c8927a4544f9a964c (diff)
downloadvaadin-framework-26a969ecadc126936b5886cc45751b83e67e8175.tar.gz
vaadin-framework-26a969ecadc126936b5886cc45751b83e67e8175.zip
Fix for #7808
svn changeset:21755/svn branch:6.7
-rw-r--r--src/com/vaadin/ui/Table.java4
-rw-r--r--tests/testbench/com/vaadin/tests/components/treetable/DisappearingComponents.html32
2 files changed, 34 insertions, 2 deletions
diff --git a/src/com/vaadin/ui/Table.java b/src/com/vaadin/ui/Table.java
index cc0dd50ea8..0ededf3c6b 100644
--- a/src/com/vaadin/ui/Table.java
+++ b/src/com/vaadin/ui/Table.java
@@ -1539,9 +1539,9 @@ public class Table extends AbstractSelect implements Action.Container,
// Calculate the new cache size
int newCachedRowCount = currentlyCachedRowCount;
- if (currentlyCachedRowCount < pageLength) {
+ if (pageLength == 0 || currentlyCachedRowCount < pageLength) {
newCachedRowCount = currentlyCachedRowCount + rows;
- if (newCachedRowCount > pageLength) {
+ if (pageLength > 0 && newCachedRowCount > pageLength) {
newCachedRowCount = pageLength;
}
}
diff --git a/tests/testbench/com/vaadin/tests/components/treetable/DisappearingComponents.html b/tests/testbench/com/vaadin/tests/components/treetable/DisappearingComponents.html
new file mode 100644
index 0000000000..1a20b798ec
--- /dev/null
+++ b/tests/testbench/com/vaadin/tests/components/treetable/DisappearingComponents.html
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head profile="http://selenium-ide.openqa.org/profiles/test-case">
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+<link rel="selenium.base" href="" />
+<title>DisappearingComponents</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">DisappearingComponents</td></tr>
+</thead><tbody>
+<tr>
+ <td>open</td>
+ <td>/run/com.vaadin.tests.components.treetable.DisappearingComponents?restartApplication</td>
+ <td></td>
+</tr>
+<tr>
+ <td>mouseClick</td>
+ <td>vaadin=runcomvaadintestscomponentstreetableDisappearingComponents::/VVerticalLayout[0]/ChildComponentContainer[0]/VTreeTable[0]/domChild[1]/domChild[0]/domChild[1]/domChild[0]/domChild[1]/domChild[0]/domChild[0]/domChild[0]</td>
+ <td>12,7</td>
+</tr>
+<tr>
+ <td>verifyElementPresent</td>
+ <td>vaadin=runcomvaadintestscomponentstreetableDisappearingComponents::/VVerticalLayout[0]/ChildComponentContainer[0]/VTreeTable[0]/FocusableScrollPanel[0]/VTreeTable$VTreeTableScrollBody[0]/VTreeTable$VTreeTableScrollBody$VTreeTableRow[2]/VLink[0]/domChild[0]/domChild[0]</td>
+ <td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>