]> source.dussan.org Git - vaadin-framework.git/commitdiff
#7950 ComboBox show paging button even though there are no matches
authorArtur Signell <artur.signell@itmill.com>
Thu, 17 Nov 2011 11:44:13 +0000 (11:44 +0000)
committerArtur Signell <artur.signell@itmill.com>
Thu, 17 Nov 2011 11:44:13 +0000 (11:44 +0000)
svn changeset:22033/svn branch:6.7

src/com/vaadin/terminal/gwt/client/ui/VFilterSelect.java
tests/testbench/com/vaadin/tests/components/combobox/ComboBoxFiltering.html [new file with mode: 0644]

index cb75a508cb876306737bea482643a349464f7d18..29e1221a0630d0c235339a3aea1fcc9eb1e2ef0c 100644 (file)
@@ -1108,6 +1108,8 @@ public class VFilterSelect extends Composite implements Paintable, Field,
         final UIDL options = uidl.getChildUIDL(0);
         if (uidl.hasAttribute("totalMatches")) {
             totalMatches = uidl.getIntAttribute("totalMatches");
+        } else {
+            totalMatches = 0;
         }
 
         // used only to calculate minimum popup width
diff --git a/tests/testbench/com/vaadin/tests/components/combobox/ComboBoxFiltering.html b/tests/testbench/com/vaadin/tests/components/combobox/ComboBoxFiltering.html
new file mode 100644 (file)
index 0000000..3de2218
--- /dev/null
@@ -0,0 +1,62 @@
+<?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>New Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">New Test</td></tr>
+</thead><tbody>
+<tr>
+       <td>open</td>
+       <td>/run/com.vaadin.tests.components.combobox.ComboBoxSlow?restartApplication</td>
+       <td></td>
+</tr>
+<tr>
+       <td>mouseClick</td>
+       <td>vaadin=runcomvaadintestscomponentscomboboxComboBoxSlow::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VFilterSelect[0]/domChild[0]</td>
+       <td>92,19</td>
+</tr>
+<tr>
+       <td>enterCharacter</td>
+       <td>vaadin=runcomvaadintestscomponentscomboboxComboBoxSlow::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VFilterSelect[0]/domChild[0]</td>
+       <td>1</td>
+</tr>
+<tr>
+       <td>screenCapture</td>
+       <td></td>
+       <td>filter-no-match</td>
+</tr>
+<tr>
+       <td>enterCharacter</td>
+       <td>vaadin=runcomvaadintestscomponentscomboboxComboBoxSlow::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VFilterSelect[0]/domChild[0]</td>
+       <td>Item 12</td>
+</tr>
+<tr>
+       <td>screenCapture</td>
+       <td></td>
+       <td>filter-11-matches-paging</td>
+</tr>
+<tr>
+       <td>screenCapture</td>
+       <td></td>
+       <td>filter-11-matches-page-2</td>
+</tr>
+<tr>
+       <td>enterCharacter</td>
+       <td>vaadin=runcomvaadintestscomponentscomboboxComboBoxSlow::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VFilterSelect[0]/domChild[0]</td>
+       <td>Item 100</td>
+</tr>
+<tr>
+       <td>screenCapture</td>
+       <td></td>
+       <td>filter-2-matches-no-paging</td>
+</tr>
+
+</tbody></table>
+</body>
+</html>