aboutsummaryrefslogtreecommitdiffstats
path: root/client/src
diff options
context:
space:
mode:
authorTeemu Suo-Anttila <teemusa@vaadin.com>2015-07-17 11:52:17 +0300
committerVaadin Code Review <review@vaadin.com>2015-07-17 09:56:27 +0000
commit929adacf733d5e685925f143061db7d0450d7b03 (patch)
tree4ffce506537dd4b697ddd1fc0c43b79243a37854 /client/src
parent23abf1d905eca80ad36e20d2de13203b98e23ac7 (diff)
downloadvaadin-framework-929adacf733d5e685925f143061db7d0450d7b03.tar.gz
vaadin-framework-929adacf733d5e685925f143061db7d0450d7b03.zip
Convert ComboBoxLargeIconsTest from TB2 to TB4
This patch also adds some subpart awareness as well as deferred worker interface to VFilterSelect to support running TB4 tests reliably. Change-Id: I41f2af38f7eba2194aa49c8d7a0d13073166cddf
Diffstat (limited to 'client/src')
-rw-r--r--client/src/com/vaadin/client/ui/VFilterSelect.java21
1 files changed, 16 insertions, 5 deletions
diff --git a/client/src/com/vaadin/client/ui/VFilterSelect.java b/client/src/com/vaadin/client/ui/VFilterSelect.java
index 1e474d3a1f..8d9e30ac6e 100644
--- a/client/src/com/vaadin/client/ui/VFilterSelect.java
+++ b/client/src/com/vaadin/client/ui/VFilterSelect.java
@@ -65,6 +65,7 @@ import com.vaadin.client.BrowserInfo;
import com.vaadin.client.ComponentConnector;
import com.vaadin.client.ComputedStyle;
import com.vaadin.client.ConnectorMap;
+import com.vaadin.client.DeferredWorker;
import com.vaadin.client.Focusable;
import com.vaadin.client.UIDL;
import com.vaadin.client.VConsole;
@@ -90,7 +91,7 @@ import com.vaadin.shared.util.SharedUtil;
public class VFilterSelect extends Composite implements Field, KeyDownHandler,
KeyUpHandler, ClickHandler, FocusHandler, BlurHandler, Focusable,
SubPartAware, HandlesAriaCaption, HandlesAriaInvalid,
- HandlesAriaRequired {
+ HandlesAriaRequired, DeferredWorker {
/**
* Represents a suggestion in the suggestion popup box
@@ -417,7 +418,7 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler,
selectPrevPage();
} else {
- if(!menu.getItems().isEmpty()) {
+ if (!menu.getItems().isEmpty()) {
selectLastItem();
}
}
@@ -2187,11 +2188,15 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler,
@Override
public com.google.gwt.user.client.Element getSubPartElement(String subPart) {
- if ("textbox".equals(subPart)) {
+ String[] parts = subPart.split("/");
+ if ("textbox".equals(parts[0])) {
return tb.getElement();
- } else if ("button".equals(subPart)) {
+ } else if ("button".equals(parts[0])) {
return popupOpener.getElement();
- } else if ("popup".equals(subPart) && suggestionPopup.isAttached()) {
+ } else if ("popup".equals(parts[0]) && suggestionPopup.isAttached()) {
+ if (parts.length == 2) {
+ return suggestionPopup.menu.getSubPartElement(parts[1]);
+ }
return suggestionPopup.getElement();
}
return null;
@@ -2235,4 +2240,10 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler,
selectPopupItemWhenResponseIsReceived = Select.NONE;
}
+ @Override
+ public boolean isWorkPending() {
+ return waitingForFilteringResponse
+ || suggestionPopup.lazyPageScroller.isRunning();
+ }
+
}