diff options
author | John Ahlroos <john@vaadin.com> | 2013-01-08 11:33:47 +0200 |
---|---|---|
committer | John Ahlroos <john@vaadin.com> | 2013-01-08 12:36:59 +0200 |
commit | 27fcaf2699ee4359c2e0cdefb53f17bead2165db (patch) | |
tree | 245cb8e22e19ad37c144e54e568243cc1895a400 /client/src | |
parent | 68406d87bb4dfb90d460ac02ef6412493f76eba7 (diff) | |
download | vaadin-framework-27fcaf2699ee4359c2e0cdefb53f17bead2165db.tar.gz vaadin-framework-27fcaf2699ee4359c2e0cdefb53f17bead2165db.zip |
Fix for fixing both styling and broken behavior with ListSelect
with newItemsAllowed enabled. #10537
Change-Id: I82682ffbc2bc1f2801a6826d7e0f78a82990ae9a
Diffstat (limited to 'client/src')
-rw-r--r-- | client/src/com/vaadin/client/ApplicationConnection.java | 9 | ||||
-rw-r--r-- | client/src/com/vaadin/client/ui/optiongroup/OptionGroupBaseConnector.java | 7 |
2 files changed, 16 insertions, 0 deletions
diff --git a/client/src/com/vaadin/client/ApplicationConnection.java b/client/src/com/vaadin/client/ApplicationConnection.java index fa3b945163..4a3215bb21 100644 --- a/client/src/com/vaadin/client/ApplicationConnection.java +++ b/client/src/com/vaadin/client/ApplicationConnection.java @@ -3110,6 +3110,15 @@ public class ApplicationConnection { */ @Deprecated public boolean hasEventListeners(Widget widget, String eventIdentifier) { + ComponentConnector connector = getConnectorMap().getConnector(widget); + if (connector == null) { + /* + * No connector will exist in cases where Vaadin widgets have been + * re-used without implementing server<->client communication. + */ + return false; + } + return hasEventListeners(getConnectorMap().getConnector(widget), eventIdentifier); } diff --git a/client/src/com/vaadin/client/ui/optiongroup/OptionGroupBaseConnector.java b/client/src/com/vaadin/client/ui/optiongroup/OptionGroupBaseConnector.java index 93df05e347..86e857ac7f 100644 --- a/client/src/com/vaadin/client/ui/optiongroup/OptionGroupBaseConnector.java +++ b/client/src/com/vaadin/client/ui/optiongroup/OptionGroupBaseConnector.java @@ -18,6 +18,7 @@ package com.vaadin.client.ui.optiongroup; import com.vaadin.client.ApplicationConnection; import com.vaadin.client.Paintable; +import com.vaadin.client.StyleConstants; import com.vaadin.client.UIDL; import com.vaadin.client.ui.AbstractFieldConnector; import com.vaadin.client.ui.VNativeButton; @@ -72,8 +73,14 @@ public abstract class OptionGroupBaseConnector extends AbstractFieldConnector getWidget().newItemButton = new VNativeButton(); getWidget().newItemButton.setText("+"); getWidget().newItemButton.addClickHandler(getWidget()); + getWidget().newItemButton + .addStyleName(StyleConstants.UI_WIDGET); getWidget().newItemField = new VTextField(); + getWidget().newItemField.client = getConnection(); + getWidget().newItemField.paintableId = getConnectorId(); getWidget().newItemField.addKeyPressHandler(getWidget()); + getWidget().newItemField.addStyleName(StyleConstants.UI_WIDGET); + } getWidget().newItemField.setEnabled(getWidget().isEnabled() && !getWidget().isReadonly()); |