diff options
Diffstat (limited to 'uitest/src/com/vaadin/tests/application/RefreshStatePreserve.java')
-rw-r--r-- | uitest/src/com/vaadin/tests/application/RefreshStatePreserve.java | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/uitest/src/com/vaadin/tests/application/RefreshStatePreserve.java b/uitest/src/com/vaadin/tests/application/RefreshStatePreserve.java index c99e384f81..f4d7f2a4e4 100644 --- a/uitest/src/com/vaadin/tests/application/RefreshStatePreserve.java +++ b/uitest/src/com/vaadin/tests/application/RefreshStatePreserve.java @@ -1,18 +1,32 @@ package com.vaadin.tests.application; import com.vaadin.annotations.PreserveOnRefresh; +import com.vaadin.server.Page.FragmentChangedEvent; +import com.vaadin.server.Page.FragmentChangedListener; import com.vaadin.server.VaadinRequest; import com.vaadin.tests.components.AbstractTestUI; +import com.vaadin.tests.util.Log; import com.vaadin.ui.Label; @PreserveOnRefresh public class RefreshStatePreserve extends AbstractTestUI { + private Log log = new Log(5); + @Override protected void setup(VaadinRequest request) { // Internal parameter sent by vaadinBootstrap.js, addComponent(new Label("window.name: " + request.getParameter("wn"))); addComponent(new Label("UI id: " + getUIId())); + addComponent(log); + + log.log("Initial fragment: " + getPage().getFragment()); + getPage().addFragmentChangedListener(new FragmentChangedListener() { + @Override + public void fragmentChanged(FragmentChangedEvent event) { + log.log("Fragment changed to " + event.getFragment()); + } + }); } @Override @@ -24,4 +38,4 @@ public class RefreshStatePreserve extends AbstractTestUI { protected Integer getTicketNumber() { return Integer.valueOf(8068); } -} +}
\ No newline at end of file |