From 419c6c787508a8b9c14a4613a96f3ac8e48b1981 Mon Sep 17 00:00:00 2001 From: Jens Jansson Date: Fri, 28 Jun 2013 15:09:08 +0300 Subject: Implemented Focusable in MenuBar (#7674) Change-Id: I31cd6fafffacc16147e63d3878fcf025163deb5b --- .../tests/components/menubar/MenuBarFocus.html | 71 ++++++++++++++ .../tests/components/menubar/MenuBarFocus.java | 102 +++++++++++++++++++++ 2 files changed, 173 insertions(+) create mode 100644 uitest/src/com/vaadin/tests/components/menubar/MenuBarFocus.html create mode 100644 uitest/src/com/vaadin/tests/components/menubar/MenuBarFocus.java (limited to 'uitest/src') diff --git a/uitest/src/com/vaadin/tests/components/menubar/MenuBarFocus.html b/uitest/src/com/vaadin/tests/components/menubar/MenuBarFocus.html new file mode 100644 index 0000000000..cd8de3757a --- /dev/null +++ b/uitest/src/com/vaadin/tests/components/menubar/MenuBarFocus.html @@ -0,0 +1,71 @@ + + + + + + +New Test + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
New Test
open/run/MenuBarFocus?restartApplication
pressSpecialKeyvaadin=runMenuBarFocus::/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[0]/VMenuBar[0]down
pressSpecialKeyvaadin=runMenuBarFocus::/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[0]/VMenuBar[0]down
pressSpecialKeyvaadin=runMenuBarFocus::/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[0]/VMenuBar[0]enter
assertTextvaadin=runMenuBarFocus::/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[2]/VLabel[0]Foo clicked
clickvaadin=runMenuBarFocus::/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[1]/VButton[0]/domChild[0]/domChild[0]
pressSpecialKeyvaadin=runMenuBarFocus::/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[0]/VMenuBar[0]down
pressSpecialKeyvaadin=runMenuBarFocus::/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[0]/VMenuBar[0]down
pressSpecialKeyvaadin=runMenuBarFocus::/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[0]/VMenuBar[0]down
pressSpecialKeyvaadin=runMenuBarFocus::/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[0]/VMenuBar[0]enter
assertTextvaadin=runMenuBarFocus::/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[3]/VLabel[0]Bar clicked
+ + \ No newline at end of file diff --git a/uitest/src/com/vaadin/tests/components/menubar/MenuBarFocus.java b/uitest/src/com/vaadin/tests/components/menubar/MenuBarFocus.java new file mode 100644 index 0000000000..2ea7a23333 --- /dev/null +++ b/uitest/src/com/vaadin/tests/components/menubar/MenuBarFocus.java @@ -0,0 +1,102 @@ +/* + * Copyright 2000-2013 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.vaadin.tests.components.menubar; + +import com.vaadin.server.VaadinRequest; +import com.vaadin.tests.components.AbstractTestUI; +import com.vaadin.ui.Button; +import com.vaadin.ui.Button.ClickEvent; +import com.vaadin.ui.Button.ClickListener; +import com.vaadin.ui.Label; +import com.vaadin.ui.MenuBar; +import com.vaadin.ui.MenuBar.Command; +import com.vaadin.ui.MenuBar.MenuItem; + +public class MenuBarFocus extends AbstractTestUI { + + /* + * (non-Javadoc) + * + * @see com.vaadin.tests.components.AbstractTestUI#setup(com.vaadin.server. + * VaadinRequest) + */ + @Override + protected void setup(VaadinRequest request) { + final MenuBar bar = buildMenu(); + Button focusButton = buildButton(bar); + + addComponent(bar); + addComponent(focusButton); + getLayout().setSpacing(true); + } + + private MenuBar buildMenu() { + final MenuBar bar = new MenuBar(); + bar.setDescription("Root Menu"); + + Command command = new Command() { + + @Override + public void menuSelected(MenuItem selectedItem) { + addComponent(new Label(selectedItem.getText() + " clicked")); + + } + }; + + // File + final MenuItem file = bar.addItem("File", null); + file.addItem("Foo", command); + file.addItem("Bar", command); + + // Edit + MenuItem edit = bar.addItem("Edit", null); + edit.addItem("Baz", command); + edit.addItem("Bay", command); + + bar.setTabIndex(2); + return bar; + } + + private Button buildButton(final MenuBar bar) { + ClickListener buttonClickListener = new ClickListener() { + @Override + public void buttonClick(ClickEvent event) { + bar.focus(); + } + }; + + Button focusButton = new Button("Click me to focus the menubar", + buttonClickListener); + focusButton.setTabIndex(1); + return focusButton; + } + + /* + * (non-Javadoc) + * + * @see com.vaadin.tests.components.AbstractTestUI#getTestDescription() + */ + @Override + protected String getTestDescription() { + return "This test checks if you can focus a menu bar on the client from the server side"; + } + + @Override + protected Integer getTicketNumber() { + return 7674; + } + +} -- cgit v1.2.3 From a4f127722af09a0e67f8df7c9aa3916b52d4595a Mon Sep 17 00:00:00 2001 From: Jouni Koivuviita Date: Fri, 28 Jun 2013 16:00:59 +0300 Subject: Fixed NPE in ApplicationRunnerServlet (#12145) If the path for a test case file contained special characters (such as space), they would get URL encoded which wouldn't work for File constructors. Fixed by using URI.getPath(), which does the decoding. Change-Id: I2a7c13b785adbb2e486d3807b115540c0ba70fa6 --- uitest/src/com/vaadin/launcher/ApplicationRunnerServlet.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'uitest/src') diff --git a/uitest/src/com/vaadin/launcher/ApplicationRunnerServlet.java b/uitest/src/com/vaadin/launcher/ApplicationRunnerServlet.java index 8c7edcac2e..a2f3c59f07 100644 --- a/uitest/src/com/vaadin/launcher/ApplicationRunnerServlet.java +++ b/uitest/src/com/vaadin/launcher/ApplicationRunnerServlet.java @@ -18,6 +18,8 @@ package com.vaadin.launcher; import java.io.File; import java.io.IOException; import java.net.MalformedURLException; +import java.net.URI; +import java.net.URISyntaxException; import java.net.URL; import java.util.Collections; import java.util.LinkedHashSet; @@ -64,7 +66,13 @@ public class ApplicationRunnerServlet extends LegacyVaadinServlet { String str = TestBase.class.getName().replace('.', '/') + ".class"; URL url = getService().getClassLoader().getResource(str); if ("file".equals(url.getProtocol())) { - File comVaadinTests = new File(url.getPath()).getParentFile() + String path = url.getPath(); + try { + path = new URI(path).getPath(); + } catch (URISyntaxException e) { + getLogger().log(Level.FINE, "Failed to decode url", e); + } + File comVaadinTests = new File(path).getParentFile() .getParentFile(); addDirectories(comVaadinTests, defaultPackages, "com.vaadin.tests"); -- cgit v1.2.3 From 08d365a41885c62597b9f0d29d6ef59b45b36577 Mon Sep 17 00:00:00 2001 From: Teemu Pöntelin Date: Fri, 28 Jun 2013 15:13:45 +0300 Subject: Fixed slider value initialization on HSV and RGB tabs of ColorPicker. (#7863) Change-Id: I3776400d849d4ba9f76d6296603152c0a6464aaa --- .../components/colorpicker/ColorPickerPopup.java | 84 ++++++++-------------- .../components/colorpicker/ColorPickerHsvTest.html | 37 ++++++++++ .../components/colorpicker/ColorPickerHsvTest.java | 41 +++++++++++ 3 files changed, 109 insertions(+), 53 deletions(-) create mode 100644 uitest/src/com/vaadin/tests/components/colorpicker/ColorPickerHsvTest.html create mode 100644 uitest/src/com/vaadin/tests/components/colorpicker/ColorPickerHsvTest.java (limited to 'uitest/src') diff --git a/server/src/com/vaadin/ui/components/colorpicker/ColorPickerPopup.java b/server/src/com/vaadin/ui/components/colorpicker/ColorPickerPopup.java index fee52d1a24..b1eef16024 100644 --- a/server/src/com/vaadin/ui/components/colorpicker/ColorPickerPopup.java +++ b/server/src/com/vaadin/ui/components/colorpicker/ColorPickerPopup.java @@ -276,11 +276,9 @@ public class ColorPickerPopup extends Window implements ClickListener, sliders.setStyleName("rgb-sliders"); redSlider = createRGBSlider("Red", "red"); - - try { - redSlider.setValue(((Integer) color.getRed()).doubleValue()); - } catch (ValueOutOfBoundsException e) { - } + greenSlider = createRGBSlider("Green", "green"); + blueSlider = createRGBSlider("Blue", "blue"); + setRgbSliderValues(color); redSlider.addValueChangeListener(new ValueChangeListener() { @Override @@ -296,13 +294,6 @@ public class ColorPickerPopup extends Window implements ClickListener, sliders.addComponent(redSlider); - greenSlider = createRGBSlider("Green", "green"); - - try { - greenSlider.setValue(((Integer) color.getGreen()).doubleValue()); - } catch (ValueOutOfBoundsException e) { - } - greenSlider.addValueChangeListener(new ValueChangeListener() { @Override public void valueChange(ValueChangeEvent event) { @@ -316,13 +307,6 @@ public class ColorPickerPopup extends Window implements ClickListener, }); sliders.addComponent(greenSlider); - blueSlider = createRGBSlider("Blue", "blue"); - - try { - blueSlider.setValue(((Integer) color.getBlue()).doubleValue()); - } catch (ValueOutOfBoundsException e) { - } - blueSlider.addValueChangeListener(new ValueChangeListener() { @Override public void valueChange(ValueChangeEvent event) { @@ -368,15 +352,15 @@ public class ColorPickerPopup extends Window implements ClickListener, hsvLayout.addComponent(hsvGradient); selectors.add(hsvGradient); - float[] hsv = color.getHSV(); VerticalLayout sliders = new VerticalLayout(); sliders.setStyleName("hsv-sliders"); hueSlider = new Slider("Hue", 0, 360); - try { - hueSlider.setValue(((Float) hsv[0]).doubleValue()); - } catch (ValueOutOfBoundsException e1) { - } + saturationSlider = new Slider("Saturation", 0, 100); + valueSlider = new Slider("Value", 0, 100); + + float[] hsv = color.getHSV(); + setHsvSliderValues(hsv); hueSlider.setStyleName("hsv-slider"); hueSlider.addStyleName("hue-slider"); @@ -410,13 +394,6 @@ public class ColorPickerPopup extends Window implements ClickListener, }); sliders.addComponent(hueSlider); - saturationSlider = new Slider("Saturation", 0, 100); - - try { - saturationSlider.setValue(((Float) hsv[1]).doubleValue()); - } catch (ValueOutOfBoundsException e1) { - } - saturationSlider.setStyleName("hsv-slider"); saturationSlider.setWidth("220px"); saturationSlider.setImmediate(true); @@ -438,13 +415,6 @@ public class ColorPickerPopup extends Window implements ClickListener, }); sliders.addComponent(saturationSlider); - valueSlider = new Slider("Value", 0, 100); - - try { - valueSlider.setValue(((Float) hsv[2]).doubleValue()); - } catch (ValueOutOfBoundsException e1) { - } - valueSlider.setStyleName("hsv-slider"); valueSlider.setWidth("220px"); valueSlider.setImmediate(true); @@ -576,23 +546,11 @@ public class ColorPickerPopup extends Window implements ClickListener, setColor(event.getColor()); updatingColors = true; - try { - redSlider - .setValue(((Integer) selectedColor.getRed()).doubleValue()); - blueSlider.setValue(((Integer) selectedColor.getBlue()) - .doubleValue()); - greenSlider.setValue(((Integer) selectedColor.getGreen()) - .doubleValue()); - - float[] hsv = selectedColor.getHSV(); - hueSlider.setValue(((Float) (hsv[0] * 360f)).doubleValue()); - saturationSlider.setValue(((Float) (hsv[1] * 100f)).doubleValue()); - valueSlider.setValue(((Float) (hsv[2] * 100f)).doubleValue()); + setRgbSliderValues(selectedColor); + float[] hsv = selectedColor.getHSV(); + setHsvSliderValues(hsv); - } catch (ValueOutOfBoundsException e) { - e.printStackTrace(); - } updatingColors = false; for (ColorSelector s : selectors) { @@ -603,6 +561,26 @@ public class ColorPickerPopup extends Window implements ClickListener, } } + private void setRgbSliderValues(Color color) { + try { + redSlider.setValue(((Integer) color.getRed()).doubleValue()); + blueSlider.setValue(((Integer) color.getBlue()).doubleValue()); + greenSlider.setValue(((Integer) color.getGreen()).doubleValue()); + } catch (ValueOutOfBoundsException e) { + e.printStackTrace(); + } + } + + private void setHsvSliderValues(float[] hsv) { + try { + hueSlider.setValue(((Float) (hsv[0] * 360f)).doubleValue()); + saturationSlider.setValue(((Float) (hsv[1] * 100f)).doubleValue()); + valueSlider.setValue(((Float) (hsv[2] * 100f)).doubleValue()); + } catch (ValueOutOfBoundsException e) { + e.printStackTrace(); + } + } + @Override public void addColorChangeListener(ColorChangeListener listener) { addListener(ColorChangeEvent.class, listener, COLOR_CHANGE_METHOD); diff --git a/uitest/src/com/vaadin/tests/components/colorpicker/ColorPickerHsvTest.html b/uitest/src/com/vaadin/tests/components/colorpicker/ColorPickerHsvTest.html new file mode 100644 index 0000000000..1c53673b41 --- /dev/null +++ b/uitest/src/com/vaadin/tests/components/colorpicker/ColorPickerHsvTest.html @@ -0,0 +1,37 @@ + + + + + + +ColorPickerTest + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ColorPickerTest
open/run/com.vaadin.tests.components.colorpicker.ColorPickerHsvTest?restartApplication
mouseClickvaadin=runcomvaadintestscomponentscolorpickerColorPickerHsvTest::PID_Scolorpicker/domChild[1]20,16
mouseClickvaadin=runcomvaadintestscomponentscolorpickerColorPickerHsvTest::/VWindow[0]/FocusableScrollPanel[0]/VVerticalLayout[0]/Slot[0]/VTabsheet[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[1]/domChild[0]/domChild[0]/domChild[0]16,5
screenCapturehsv-initial-sliders
+ + diff --git a/uitest/src/com/vaadin/tests/components/colorpicker/ColorPickerHsvTest.java b/uitest/src/com/vaadin/tests/components/colorpicker/ColorPickerHsvTest.java new file mode 100644 index 0000000000..ab77fbf2ba --- /dev/null +++ b/uitest/src/com/vaadin/tests/components/colorpicker/ColorPickerHsvTest.java @@ -0,0 +1,41 @@ +package com.vaadin.tests.components.colorpicker; + +import com.vaadin.server.VaadinRequest; +import com.vaadin.shared.ui.colorpicker.Color; +import com.vaadin.tests.components.AbstractTestUI; +import com.vaadin.ui.ColorPickerArea; +import com.vaadin.ui.Label; +import com.vaadin.ui.VerticalLayout; + +/** + * Tests the HSV tab slider values when initially opening the tab. + */ +public class ColorPickerHsvTest extends AbstractTestUI { + + @Override + protected void setup(VaadinRequest request) { + VerticalLayout layout = new VerticalLayout(); + layout.setMargin(true); + setContent(layout); + + layout.addComponent(new Label( + "HSV initial values when opening the tab for the first time")); + ColorPickerArea colorpicker = new ColorPickerArea(); + colorpicker.setColor(new Color(Integer.parseInt("00b4f0", 16))); + colorpicker.setDefaultCaptionEnabled(false); + colorpicker.setId("colorpicker"); + layout.addComponent(colorpicker); + + } + + @Override + protected String getTestDescription() { + return "Tests the slider values when initially opening the HSV tab."; + } + + @Override + protected Integer getTicketNumber() { + return 7863; + } + +} -- cgit v1.2.3 From 6291a5080e2a6d2f0c5a955e5cf9ae984763a5aa Mon Sep 17 00:00:00 2001 From: Risto Yrjänä Date: Fri, 28 Jun 2013 15:53:03 +0300 Subject: Ensure that Slider diffstate always contains "value" (#12133) Force diff state to contain "value", so that value changes from value change listeners work. Change-Id: I5b2c661f1297ec0272c150a5a9ff4ca26f19fefe --- server/src/com/vaadin/ui/Slider.java | 17 ++++++ .../slider/SliderUpdateFromValueChange.html | 37 ++++++++++++ .../slider/SliderUpdateFromValueChange.java | 65 ++++++++++++++++++++++ 3 files changed, 119 insertions(+) create mode 100644 uitest/src/com/vaadin/tests/components/slider/SliderUpdateFromValueChange.html create mode 100644 uitest/src/com/vaadin/tests/components/slider/SliderUpdateFromValueChange.java (limited to 'uitest/src') diff --git a/server/src/com/vaadin/ui/Slider.java b/server/src/com/vaadin/ui/Slider.java index e63fdc5e10..44fc49ba9b 100644 --- a/server/src/com/vaadin/ui/Slider.java +++ b/server/src/com/vaadin/ui/Slider.java @@ -16,6 +16,8 @@ package com.vaadin.ui; +import org.json.JSONException; + import com.vaadin.shared.ui.slider.SliderOrientation; import com.vaadin.shared.ui.slider.SliderServerRpc; import com.vaadin.shared.ui.slider.SliderState; @@ -32,6 +34,21 @@ public class Slider extends AbstractField { @Override public void valueChanged(double value) { + /* + * Client side updates the state before sending the event so we need + * to make sure the cached state is updated to match the client. If + * we do not do this, a reverting setValue() call in a listener will + * not cause the new state to be sent to the client. + * + * See #12133. + */ + try { + getUI().getConnectorTracker().getDiffState(Slider.this) + .put("value", value); + } catch (JSONException e) { + throw new RuntimeException(e); + } + try { setValue(value, true); } catch (final ValueOutOfBoundsException e) { diff --git a/uitest/src/com/vaadin/tests/components/slider/SliderUpdateFromValueChange.html b/uitest/src/com/vaadin/tests/components/slider/SliderUpdateFromValueChange.html new file mode 100644 index 0000000000..81c5938eb2 --- /dev/null +++ b/uitest/src/com/vaadin/tests/components/slider/SliderUpdateFromValueChange.html @@ -0,0 +1,37 @@ + + + + + + +SliderUpdateFromValueChange + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SliderUpdateFromValueChange
open/run/com.vaadin.tests.components.slider.SliderUpdateFromValueChange?restartApplication
dragAndDropvaadin=runcomvaadintestscomponentssliderSliderUpdateFromValueChange::/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[0]/VSlider[0]/domChild[2]/domChild[0]67,0
dragAndDropvaadin=runcomvaadintestscomponentssliderSliderUpdateFromValueChange::/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[0]/VSlider[0]/domChild[2]/domChild[0]-188,0
assertNotAttributevaadin=runcomvaadintestscomponentssliderSliderUpdateFromValueChange::/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[0]/VSlider[0]/domChild[2]/domChild[0]@styleregex:.*(margin-left|MARGIN-LEFT): 0px.*
+ + diff --git a/uitest/src/com/vaadin/tests/components/slider/SliderUpdateFromValueChange.java b/uitest/src/com/vaadin/tests/components/slider/SliderUpdateFromValueChange.java new file mode 100644 index 0000000000..21b56b7972 --- /dev/null +++ b/uitest/src/com/vaadin/tests/components/slider/SliderUpdateFromValueChange.java @@ -0,0 +1,65 @@ +/* + * Copyright 2000-2013 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ + +/** + * + */ +package com.vaadin.tests.components.slider; + +import com.vaadin.data.Property.ValueChangeEvent; +import com.vaadin.data.Property.ValueChangeListener; +import com.vaadin.server.VaadinRequest; +import com.vaadin.tests.components.AbstractTestUI; +import com.vaadin.ui.Slider; + +/** + * Testcase for #12133 + * + * @author Vaadin Ltd + */ +public class SliderUpdateFromValueChange extends AbstractTestUI { + + @Override + protected void setup(VaadinRequest request) { + final Slider slider = new Slider(0, 100, 1); + slider.addValueChangeListener(new ValueChangeListener() { + + @Override + public void valueChange(ValueChangeEvent event) { + Double value = (Double) event.getProperty().getValue(); + if (value < 100.0) { + slider.setValue(100.0); + } + slider.markAsDirty(); + } + + }); + slider.setImmediate(true); + slider.setWidth(200, Unit.PIXELS); + + addComponent(slider); + } + + @Override + protected String getTestDescription() { + return "Slider.setValue() does not update graphical representation of Slider component"; + } + + @Override + protected Integer getTicketNumber() { + return 12133; + } +} -- cgit v1.2.3 From 6c4da294423a22f81840d9c0d807aca4ca9b8676 Mon Sep 17 00:00:00 2001 From: Anna Koskinen Date: Fri, 28 Jun 2013 16:47:10 +0300 Subject: Ensure table's cells aren't refreshed if table is detached. (#9138) Change-Id: I026cd70e9e518fa320f6ec3011194359385a3a4a --- server/src/com/vaadin/ui/Table.java | 2 +- .../table/RefreshRenderedCellsOnlyIfAttached.html | 41 +++++++ .../table/RefreshRenderedCellsOnlyIfAttached.java | 121 +++++++++++++++++++++ 3 files changed, 163 insertions(+), 1 deletion(-) create mode 100644 uitest/src/com/vaadin/tests/components/table/RefreshRenderedCellsOnlyIfAttached.html create mode 100644 uitest/src/com/vaadin/tests/components/table/RefreshRenderedCellsOnlyIfAttached.java (limited to 'uitest/src') diff --git a/server/src/com/vaadin/ui/Table.java b/server/src/com/vaadin/ui/Table.java index 0fb6197c3e..5dbf927658 100644 --- a/server/src/com/vaadin/ui/Table.java +++ b/server/src/com/vaadin/ui/Table.java @@ -1615,7 +1615,7 @@ public class Table extends AbstractSelect implements Action.Container, * guaranteed to be recreated. */ protected void refreshRenderedCells() { - if (getParent() == null) { + if (!isAttached()) { return; } diff --git a/uitest/src/com/vaadin/tests/components/table/RefreshRenderedCellsOnlyIfAttached.html b/uitest/src/com/vaadin/tests/components/table/RefreshRenderedCellsOnlyIfAttached.html new file mode 100644 index 0000000000..e6d4d69f81 --- /dev/null +++ b/uitest/src/com/vaadin/tests/components/table/RefreshRenderedCellsOnlyIfAttached.html @@ -0,0 +1,41 @@ + + + + + + +RefreshRenderedCellsOnlyIfAttachedTest + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
RefreshRenderedCellsOnlyIfAttachedTest
open/run/RefreshRenderedCellsOnlyIfAttached?restartApplication
assertTextvaadin=runRefreshRenderedCellsOnlyIfAttached::PID_Slabeldefault
clickvaadin=runRefreshRenderedCellsOnlyIfAttached::PID_Sbutton/domChild[0]/domChild[0]
assertNotTextvaadin=runRefreshRenderedCellsOnlyIfAttached::PID_Slabeldefault
assertTextvaadin=runRefreshRenderedCellsOnlyIfAttached::PID_Slabeloriginal: false, now: false
+ + \ No newline at end of file diff --git a/uitest/src/com/vaadin/tests/components/table/RefreshRenderedCellsOnlyIfAttached.java b/uitest/src/com/vaadin/tests/components/table/RefreshRenderedCellsOnlyIfAttached.java new file mode 100644 index 0000000000..3e233c69c2 --- /dev/null +++ b/uitest/src/com/vaadin/tests/components/table/RefreshRenderedCellsOnlyIfAttached.java @@ -0,0 +1,121 @@ +/* + * Copyright 2000-2013 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ + +package com.vaadin.tests.components.table; + +import com.vaadin.server.VaadinRequest; +import com.vaadin.tests.components.AbstractTestUI; +import com.vaadin.ui.Button; +import com.vaadin.ui.Button.ClickEvent; +import com.vaadin.ui.Label; +import com.vaadin.ui.Table; +import com.vaadin.ui.VerticalLayout; + +/** + * There shouldn't be any attempts to refresh table's cells if the table isn't + * attached. + * + * @since + * @author Vaadin Ltd + */ +public class RefreshRenderedCellsOnlyIfAttached extends AbstractTestUI { + + VerticalLayout layout; + boolean check; + + /* + * (non-Javadoc) + * + * @see com.vaadin.tests.components.AbstractTestUI#setup(com.vaadin.server. + * VaadinRequest) + */ + @Override + protected void setup(VaadinRequest request) { + getLayout().setMargin(true); + check = false; + layout = new VerticalLayout(); + final Label l1 = new Label("default"); + l1.setId("label"); + final Label l2 = new Label("should be: default"); + final Table t = new Table() { + /* + * (non-Javadoc) + * + * @see com.vaadin.ui.Table#refreshRenderedCells() + */ + @Override + protected void refreshRenderedCells() { + boolean original = isRowCacheInvalidated(); + super.refreshRenderedCells(); + if (check) { + l1.setValue("original: " + original + ", now: " + + isRowCacheInvalidated()); + l2.setValue("should be: false & false"); + } + } + }; + t.addContainerProperty("text", String.class, ""); + t.addItem(new Object[] { "Foo" }, "foo"); + t.setId("table"); + layout.addComponent(t); + addComponent(l1); + addComponent(l2); + addComponent(layout); + + Button b = new Button("Detach table", new Button.ClickListener() { + + @Override + public void buttonClick(ClickEvent event) { + check = true; + removeTableParent(); + // call refreshRenderedCells + t.setColumnCollapsingAllowed(true); + } + }); + b.setId("button"); + addComponent(b); + } + + /** + * Remove Table's parent component. + * + * @since + */ + protected void removeTableParent() { + removeComponent(layout); + } + + /* + * (non-Javadoc) + * + * @see com.vaadin.tests.components.AbstractTestUI#getTestDescription() + */ + @Override + protected String getTestDescription() { + return "There shouldn't be any attempts to refresh table's cells if the table isn't attached."; + } + + /* + * (non-Javadoc) + * + * @see com.vaadin.tests.components.AbstractTestUI#getTicketNumber() + */ + @Override + protected Integer getTicketNumber() { + return 9138; + } + +} -- cgit v1.2.3 From f7cc72df9b6fb54be95a02b9977e9df264037135 Mon Sep 17 00:00:00 2001 From: Henri Sara Date: Wed, 3 Jul 2013 16:33:50 +0300 Subject: Close only combobox on escape, not the window (#12163) Change-Id: I356e115b5cd96ba0a598178a15215654f2fd16bb --- client/src/com/vaadin/client/ui/VFilterSelect.java | 1 + .../combobox/EscapeClosesComboboxNotWindow.java | 43 ++++++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 uitest/src/com/vaadin/tests/components/combobox/EscapeClosesComboboxNotWindow.java (limited to 'uitest/src') diff --git a/client/src/com/vaadin/client/ui/VFilterSelect.java b/client/src/com/vaadin/client/ui/VFilterSelect.java index e08fbf8ab6..a5c1e566ca 100644 --- a/client/src/com/vaadin/client/ui/VFilterSelect.java +++ b/client/src/com/vaadin/client/ui/VFilterSelect.java @@ -1537,6 +1537,7 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler, break; case KeyCodes.KEY_ESCAPE: reset(); + DOM.eventPreventDefault(DOM.eventGetCurrentEvent()); event.stopPropagation(); break; case KeyCodes.KEY_ENTER: diff --git a/uitest/src/com/vaadin/tests/components/combobox/EscapeClosesComboboxNotWindow.java b/uitest/src/com/vaadin/tests/components/combobox/EscapeClosesComboboxNotWindow.java new file mode 100644 index 0000000000..dcd19f6b2a --- /dev/null +++ b/uitest/src/com/vaadin/tests/components/combobox/EscapeClosesComboboxNotWindow.java @@ -0,0 +1,43 @@ +package com.vaadin.tests.components.combobox; + +import com.vaadin.event.ShortcutAction.KeyCode; +import com.vaadin.server.VaadinRequest; +import com.vaadin.ui.Button; +import com.vaadin.ui.Button.ClickEvent; +import com.vaadin.ui.ComboBox; +import com.vaadin.ui.FormLayout; +import com.vaadin.ui.UI; +import com.vaadin.ui.VerticalLayout; +import com.vaadin.ui.Window; + +/** + * Ticket #12163: when a combo box popup is open in a subwindow, escape should + * only close it and not the window, also on Safari 6. + */ +public class EscapeClosesComboboxNotWindow extends UI { + final Window window = new Window("Window"); + + @Override + protected void init(VaadinRequest request) { + final VerticalLayout layout = new VerticalLayout(); + layout.setMargin(true); + setContent(layout); + + Button button = new Button("Click Me"); + button.addClickListener(new Button.ClickListener() { + @Override + public void buttonClick(ClickEvent event) { + final FormLayout content = new FormLayout(); + ComboBox cb = new ComboBox(); + cb.addItem("foo"); + cb.addItem("bar"); + content.addComponent(cb); + window.setContent(content); + window.setCloseShortcut(KeyCode.ESCAPE); + UI.getCurrent().addWindow(window); + } + }); + layout.addComponent(button); + } + +} \ No newline at end of file -- cgit v1.2.3 From 9a9b0a518000d2c765917e83ccf798dfa3e4c72a Mon Sep 17 00:00:00 2001 From: Henri Sara Date: Thu, 4 Jul 2013 10:08:52 +0300 Subject: Automatic test for escape closing window from combobox (#12163) Change-Id: I38a143fb76ebf3a64cd416e5ba7d325aedc60ffe --- .../combobox/EscapeClosesComboboxNotWindow.html | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 uitest/src/com/vaadin/tests/components/combobox/EscapeClosesComboboxNotWindow.html (limited to 'uitest/src') diff --git a/uitest/src/com/vaadin/tests/components/combobox/EscapeClosesComboboxNotWindow.html b/uitest/src/com/vaadin/tests/components/combobox/EscapeClosesComboboxNotWindow.html new file mode 100644 index 0000000000..312fffcb97 --- /dev/null +++ b/uitest/src/com/vaadin/tests/components/combobox/EscapeClosesComboboxNotWindow.html @@ -0,0 +1,42 @@ + + + + + + +EscapeClosesComboboxNotWindow + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
EscapeClosesComboboxNotWindow
open/run/EscapeClosesComboboxNotWindow?restartApplication
clickvaadin=runEscapeClosesComboboxNotWindow::/VVerticalLayout[0]/Slot[0]/VButton[0]/domChild[0]/domChild[0]
mouseClickvaadin=runEscapeClosesComboboxNotWindow::/VWindow[0]/FocusableScrollPanel[0]/VFormLayout[0]/VFormLayout$VFormLayoutTable[0]/VFilterSelect[0]/domChild[1]10,16
keyDownvaadin=runEscapeClosesComboboxNotWindow::/VWindow[0]/FocusableScrollPanel[0]/VFormLayout[0]/VFormLayout$VFormLayoutTable[0]/VFilterSelect[0]/domChild[0]\27
verifyTextPresentWindow
+ + -- cgit v1.2.3 From ae565a229325f1289348c2c0e3dc02f14ed6f549 Mon Sep 17 00:00:00 2001 From: Patrik Lindström Date: Wed, 3 Jul 2013 00:04:35 +0300 Subject: Fix bug in PopupDateField where locale was retained incorrectly if changed while popup was open (#12153) Change-Id: Ib4bebab8c6e75e7f1af7cfc5198ab6516e94a45e --- .../ui/datefield/PopupDateFieldConnector.java | 9 ++++ .../datefield/PopupDateFieldLocaleTest.html | 42 +++++++++++++++++ .../datefield/PopupDateFieldLocaleTest.java | 53 ++++++++++++++++++++++ 3 files changed, 104 insertions(+) create mode 100644 uitest/src/com/vaadin/tests/components/datefield/PopupDateFieldLocaleTest.html create mode 100644 uitest/src/com/vaadin/tests/components/datefield/PopupDateFieldLocaleTest.java (limited to 'uitest/src') diff --git a/client/src/com/vaadin/client/ui/datefield/PopupDateFieldConnector.java b/client/src/com/vaadin/client/ui/datefield/PopupDateFieldConnector.java index b3bb481658..7257af4a08 100644 --- a/client/src/com/vaadin/client/ui/datefield/PopupDateFieldConnector.java +++ b/client/src/com/vaadin/client/ui/datefield/PopupDateFieldConnector.java @@ -42,6 +42,9 @@ public class PopupDateFieldConnector extends TextualDateConnector { @Override @SuppressWarnings("deprecation") public void updateFromUIDL(UIDL uidl, ApplicationConnection client) { + + String oldLocale = getWidget().getCurrentLocale(); + boolean lastReadOnlyState = getWidget().isReadonly(); boolean lastEnabledState = getWidget().isEnabled(); @@ -64,6 +67,12 @@ public class PopupDateFieldConnector extends TextualDateConnector { getWidget().calendar.renderCalendar(); } } + + // Force re-render of calendar if locale has changed (#12153) + if (getWidget().getCurrentLocale() != oldLocale) { + getWidget().calendar.renderCalendar(); + } + getWidget().calendarToggle.setEnabled(getWidget().isEnabled()); if (getWidget().getCurrentResolution().getCalendarField() <= Resolution.MONTH diff --git a/uitest/src/com/vaadin/tests/components/datefield/PopupDateFieldLocaleTest.html b/uitest/src/com/vaadin/tests/components/datefield/PopupDateFieldLocaleTest.html new file mode 100644 index 0000000000..932ad0646e --- /dev/null +++ b/uitest/src/com/vaadin/tests/components/datefield/PopupDateFieldLocaleTest.html @@ -0,0 +1,42 @@ + + + + + + +New Test + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
New Test
open/run/com.vaadin.tests.components.datefield.PopupDateFieldLocaleTest?restartApplication
mouseClickvaadin=runcomvaadintestscomponentsdatefieldPopupDateFieldLocaleTest::/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[0]/VPopupCalendar[0]/domChild[1]15,18
mouseClick//table[@id='PID_VAADIN_POPUPCAL']/tbody/tr[2]/td/table/tbody/tr[4]/td[4]/span19,11
mouseClickvaadin=runcomvaadintestscomponentsdatefieldPopupDateFieldLocaleTest::/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[0]/VPopupCalendar[0]/domChild[1]4,14
assertTextPresentjanvier 2000
+ + diff --git a/uitest/src/com/vaadin/tests/components/datefield/PopupDateFieldLocaleTest.java b/uitest/src/com/vaadin/tests/components/datefield/PopupDateFieldLocaleTest.java new file mode 100644 index 0000000000..f12a3dda58 --- /dev/null +++ b/uitest/src/com/vaadin/tests/components/datefield/PopupDateFieldLocaleTest.java @@ -0,0 +1,53 @@ +package com.vaadin.tests.components.datefield; + +import java.util.Calendar; +import java.util.Locale; + +import com.vaadin.data.Property.ValueChangeEvent; +import com.vaadin.data.Property.ValueChangeListener; +import com.vaadin.server.VaadinRequest; +import com.vaadin.tests.components.AbstractTestUI; +import com.vaadin.ui.DateField; +import com.vaadin.ui.PopupDateField; + +public class PopupDateFieldLocaleTest extends AbstractTestUI { + + @Override + protected void setup(VaadinRequest request) { + // Set a specific time for the PopupDateField + Calendar cal = Calendar.getInstance(); + cal.set(Calendar.YEAR, 2000); + cal.set(Calendar.DAY_OF_YEAR, 1); + cal.set(Calendar.HOUR_OF_DAY, 1); + cal.set(Calendar.MINUTE, 1); + cal.set(Calendar.SECOND, 1); + cal.set(Calendar.MILLISECOND, 1); + + final PopupDateField pdf = new PopupDateField(); + pdf.setLocale(Locale.ENGLISH); + pdf.setValue(cal.getTime()); + pdf.setImmediate(true); + pdf.setResolution(DateField.RESOLUTION_SEC); + addComponent(pdf); + + pdf.addValueChangeListener(new ValueChangeListener() { + @Override + public void valueChange(ValueChangeEvent event) { + pdf.setLocale(Locale.FRENCH); + } + }); + } + + @Override + protected String getTestDescription() { + return "Changing the locale while the popupdatefield is visible can " + + "result in the locale remaining at the previous value; the locale " + + "is only changed once the current month is changed."; + } + + @Override + protected Integer getTicketNumber() { + return 12135; + } + +} \ No newline at end of file -- cgit v1.2.3 From 4a04f0068793428484b7afdc245ae766b13439f5 Mon Sep 17 00:00:00 2001 From: Patrik Lindström Date: Tue, 2 Jul 2013 15:26:35 +0300 Subject: Add test case for testing ClickEvent after dragging button (#7690) Change-Id: I9ecb796a9bcbc8415efe27873fdbd71745d0aa85 --- .../tests/components/button/ButtonIOSDragTest.java | 57 ++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 uitest/src/com/vaadin/tests/components/button/ButtonIOSDragTest.java (limited to 'uitest/src') diff --git a/uitest/src/com/vaadin/tests/components/button/ButtonIOSDragTest.java b/uitest/src/com/vaadin/tests/components/button/ButtonIOSDragTest.java new file mode 100644 index 0000000000..3d3d90728a --- /dev/null +++ b/uitest/src/com/vaadin/tests/components/button/ButtonIOSDragTest.java @@ -0,0 +1,57 @@ +/* + * Copyright 2000-2013 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ + +package com.vaadin.tests.components.button; + +import com.vaadin.server.VaadinRequest; +import com.vaadin.tests.components.AbstractTestUI; +import com.vaadin.ui.Button; +import com.vaadin.ui.Button.ClickListener; +import com.vaadin.ui.DragAndDropWrapper; +import com.vaadin.ui.DragAndDropWrapper.DragStartMode; +import com.vaadin.ui.Notification; +import com.vaadin.ui.VerticalLayout; + +public class ButtonIOSDragTest extends AbstractTestUI { + + @Override + protected void setup(VaadinRequest request) { + final VerticalLayout layout = new VerticalLayout(); + + Button offset = new Button("Drag me"); + offset.addListener(new ClickListener() { + @Override + public void buttonClick(com.vaadin.ui.Button.ClickEvent event) { + Notification.show("Button clicked!"); + } + }); + DragAndDropWrapper dragMe = new DragAndDropWrapper(offset); + dragMe.setDragStartMode(DragStartMode.WRAPPER); + layout.addComponent(dragMe); + addComponent(layout); + } + + @Override + protected String getTestDescription() { + return "Test dragging of Button in iOS - dragging from the inside of the button to the outside and releasing should not cause a ClickEvent to be fired."; + } + + @Override + protected Integer getTicketNumber() { + return 7690; + } + +} -- cgit v1.2.3 From 20162dbe200111a514ab0849963dcf3eea1a9c83 Mon Sep 17 00:00:00 2001 From: Leif Åstrand Date: Mon, 8 Jul 2013 17:23:49 +0300 Subject: Set current instances when calling UI.push from VaadinSession.unlock (#12168) Change-Id: I27795ab9ae3e3692f508e847936ccaa5a1ebadd4 --- server/src/com/vaadin/server/VaadinSession.java | 14 ++++-- server/src/com/vaadin/ui/UI.java | 9 ++-- .../com/vaadin/tests/components/ui/UiAccess.html | 26 +++++++++++ .../com/vaadin/tests/components/ui/UiAccess.java | 54 ++++++++++++++++++++++ 4 files changed, 96 insertions(+), 7 deletions(-) (limited to 'uitest/src') diff --git a/server/src/com/vaadin/server/VaadinSession.java b/server/src/com/vaadin/server/VaadinSession.java index 504788d479..9dedddcc2c 100644 --- a/server/src/com/vaadin/server/VaadinSession.java +++ b/server/src/com/vaadin/server/VaadinSession.java @@ -885,9 +885,9 @@ public class VaadinSession implements HttpSessionBindingListener, Serializable { * Unlocks this session. This method should always be used in a finally * block after {@link #lock()} to ensure that the lock is always released. *

- * If {@link #getPushMode() the push mode} is {@link PushMode#AUTOMATIC - * automatic}, pushes the changes in all UIs in this session to their - * respective clients. + * For UIs in this session that have its push mode set to + * {@link PushMode#AUTOMATIC automatic}, pending changes will be pushed to + * their respective clients. * * @see #lock() * @see UI#push() @@ -904,7 +904,13 @@ public class VaadinSession implements HttpSessionBindingListener, Serializable { for (UI ui : getUIs()) { if (ui.getPushConfiguration().getPushMode() == PushMode.AUTOMATIC) { - ui.push(); + Map, CurrentInstance> oldCurrent = CurrentInstance + .setCurrent(ui); + try { + ui.push(); + } finally { + CurrentInstance.restoreInstances(oldCurrent); + } } } } diff --git a/server/src/com/vaadin/ui/UI.java b/server/src/com/vaadin/ui/UI.java index 6c9551ea81..403bb31f63 100644 --- a/server/src/com/vaadin/ui/UI.java +++ b/server/src/com/vaadin/ui/UI.java @@ -1294,15 +1294,18 @@ public abstract class UI extends AbstractSingleComponentContainer implements * Pushes the pending changes and client RPC invocations of this UI to the * client-side. *

- * As with all UI methods, it is not safe to call push() without holding the - * {@link VaadinSession#lock() session lock}. + * As with all UI methods, the session must be locked when calling this + * method. It is also recommended that {@link UI#getCurrent()} is set up to + * return this UI since writing the response may invoke logic in any + * attached component or extension. The recommended way of fulfilling these + * conditions is to use {@link #access(Runnable)}. * * @throws IllegalStateException * if push is disabled. * @throws UIDetachedException * if this UI is not attached to a session. * - * @see #getPushMode() + * @see #getPushConfiguration() * * @since 7.1 */ diff --git a/uitest/src/com/vaadin/tests/components/ui/UiAccess.html b/uitest/src/com/vaadin/tests/components/ui/UiAccess.html index 613691623c..734b95952a 100644 --- a/uitest/src/com/vaadin/tests/components/ui/UiAccess.html +++ b/uitest/src/com/vaadin/tests/components/ui/UiAccess.html @@ -161,6 +161,32 @@ vaadin=runcomvaadintestscomponentsuiUiAccess::PID_SLog_row_0 3. Test value after access: Set before run pending + + + open + /run/com.vaadin.tests.components.ui.UiAccess?restartApplication&transport=websocket + + + + click + vaadin=runcomvaadintestscomponentsuiUiAccess::/VVerticalLayout[0]/Slot[2]/VVerticalLayout[0]/Slot[7]/VButton[0]/domChild[0]/domChild[0] + + + + waitForNotText + vaadin=runcomvaadintestscomponentsuiUiAccess::PID_SLog_row_0 + + + + assertText + vaadin=runcomvaadintestscomponentsuiUiAccess::PID_SLog_row_0 + exact:1. Current session matches in beforeResponse? true + + + assertText + vaadin=runcomvaadintestscomponentsuiUiAccess::PID_SLog_row_1 + exact:0. Current UI matches in beforeResponse? true + diff --git a/uitest/src/com/vaadin/tests/components/ui/UiAccess.java b/uitest/src/com/vaadin/tests/components/ui/UiAccess.java index 2bc91fa7b4..09f2fd8816 100644 --- a/uitest/src/com/vaadin/tests/components/ui/UiAccess.java +++ b/uitest/src/com/vaadin/tests/components/ui/UiAccess.java @@ -23,13 +23,18 @@ import java.util.concurrent.locks.ReentrantLock; import com.vaadin.server.VaadinRequest; import com.vaadin.server.VaadinService; +import com.vaadin.server.VaadinSession; +import com.vaadin.shared.communication.PushMode; import com.vaadin.tests.components.AbstractTestUIWithLog; import com.vaadin.ui.Button; import com.vaadin.ui.Button.ClickEvent; +import com.vaadin.ui.UI; import com.vaadin.util.CurrentInstance; public class UiAccess extends AbstractTestUIWithLog { + private volatile boolean checkCurrentInstancesBeforeResponse = false; + private Future checkFromBeforeClientResponse; private class CurrentInstanceTestType { @@ -283,6 +288,46 @@ public class UiAccess extends AbstractTestUIWithLog { .get(CurrentInstanceTestType.class)); } })); + + addComponent(new Button("CurrentInstance when pushing", + new Button.ClickListener() { + @Override + public void buttonClick(ClickEvent event) { + log.clear(); + if (getPushConfiguration().getPushMode() != PushMode.AUTOMATIC) { + log("Can only test with automatic push enabled"); + return; + } + + final VaadinSession session = getSession(); + new Thread() { + @Override + public void run() { + // Pretend this isn't a Vaadin thread + CurrentInstance.clearAll(); + + /* + * Get explicit lock to ensure the (implicit) + * push does not happen during normal request + * handling. + */ + session.lock(); + try { + access(new Runnable() { + @Override + public void run() { + checkCurrentInstancesBeforeResponse = true; + // Trigger beforeClientResponse + markAsDirty(); + } + }); + } finally { + session.unlock(); + } + } + }.start(); + } + })); } @Override @@ -292,6 +337,15 @@ public class UiAccess extends AbstractTestUIWithLog { + checkFromBeforeClientResponse.isDone()); checkFromBeforeClientResponse = null; } + if (checkCurrentInstancesBeforeResponse) { + UI currentUI = UI.getCurrent(); + VaadinSession currentSession = VaadinSession.getCurrent(); + + log("Current UI matches in beforeResponse? " + (currentUI == this)); + log("Current session matches in beforeResponse? " + + (currentSession == getSession())); + checkCurrentInstancesBeforeResponse = false; + } } @Override -- cgit v1.2.3