From b587b80cbd96da566b0359f61ffec4250e0a9d76 Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Thu, 17 Nov 2011 11:44:13 +0000 Subject: [PATCH] #7950 ComboBox show paging button even though there are no matches svn changeset:22033/svn branch:6.7 --- .../terminal/gwt/client/ui/VFilterSelect.java | 2 + .../combobox/ComboBoxFiltering.html | 62 +++++++++++++++++++ 2 files changed, 64 insertions(+) create mode 100644 tests/testbench/com/vaadin/tests/components/combobox/ComboBoxFiltering.html diff --git a/src/com/vaadin/terminal/gwt/client/ui/VFilterSelect.java b/src/com/vaadin/terminal/gwt/client/ui/VFilterSelect.java index cb75a508cb..29e1221a06 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VFilterSelect.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VFilterSelect.java @@ -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 index 0000000000..3de221871d --- /dev/null +++ b/tests/testbench/com/vaadin/tests/components/combobox/ComboBoxFiltering.html @@ -0,0 +1,62 @@ + + + + + + +New Test + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
New Test
open/run/com.vaadin.tests.components.combobox.ComboBoxSlow?restartApplication
mouseClickvaadin=runcomvaadintestscomponentscomboboxComboBoxSlow::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VFilterSelect[0]/domChild[0]92,19
enterCharactervaadin=runcomvaadintestscomponentscomboboxComboBoxSlow::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VFilterSelect[0]/domChild[0]1
screenCapturefilter-no-match
enterCharactervaadin=runcomvaadintestscomponentscomboboxComboBoxSlow::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VFilterSelect[0]/domChild[0]Item 12
screenCapturefilter-11-matches-paging
screenCapturefilter-11-matches-page-2
enterCharactervaadin=runcomvaadintestscomponentscomboboxComboBoxSlow::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VFilterSelect[0]/domChild[0]Item 100
screenCapturefilter-2-matches-no-paging
+ + -- 2.39.5