diff options
author | Artur Signell <artur@vaadin.com> | 2013-06-05 14:27:09 +0300 |
---|---|---|
committer | Artur Signell <artur@vaadin.com> | 2013-06-05 15:14:42 +0300 |
commit | edca4095d2e75d73f9d6a5acb2da9009129b4db2 (patch) | |
tree | 15226365a8501ba55255dc21111696709aafa632 /uitest/src/com/vaadin/tests/push/TogglePush.java | |
parent | ebd4a5c0ae6e61c20283ba5b866fe51e3576a179 (diff) | |
download | vaadin-framework-edca4095d2e75d73f9d6a5acb2da9009129b4db2.tar.gz vaadin-framework-edca4095d2e75d73f9d6a5acb2da9009129b4db2.zip |
Allow customizing client-side push config on server side (#11867)
Change-Id: I212067aa0bd04e3e73844ef57963b5622291986a
Diffstat (limited to 'uitest/src/com/vaadin/tests/push/TogglePush.java')
-rw-r--r-- | uitest/src/com/vaadin/tests/push/TogglePush.java | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/uitest/src/com/vaadin/tests/push/TogglePush.java b/uitest/src/com/vaadin/tests/push/TogglePush.java index 37687260dd..c0bdc54ee0 100644 --- a/uitest/src/com/vaadin/tests/push/TogglePush.java +++ b/uitest/src/com/vaadin/tests/push/TogglePush.java @@ -22,19 +22,22 @@ public class TogglePush extends AbstractTestUI { updateCounter(); addComponent(counterLabel); - setPushMode("disabled".equals(request.getParameter("push")) ? PushMode.DISABLED - : PushMode.AUTOMATIC); + getPushConfiguration() + .setPushMode( + "disabled".equals(request.getParameter("push")) ? PushMode.DISABLED + : PushMode.AUTOMATIC); CheckBox pushSetting = new CheckBox("Push enabled"); - pushSetting.setValue(Boolean.valueOf(getPushMode().isEnabled())); + pushSetting.setValue(Boolean.valueOf(getPushConfiguration() + .getPushMode().isEnabled())); pushSetting.setImmediate(true); pushSetting.addValueChangeListener(new ValueChangeListener() { @Override public void valueChange(ValueChangeEvent event) { if (event.getProperty().getValue() == Boolean.TRUE) { - setPushMode(PushMode.AUTOMATIC); + getPushConfiguration().setPushMode(PushMode.AUTOMATIC); } else { - setPushMode(PushMode.DISABLED); + getPushConfiguration().setPushMode(PushMode.DISABLED); } } }); |