summaryrefslogtreecommitdiffstats
path: root/uitest/src
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2012-11-13 16:29:01 +0200
committerArtur Signell <artur@vaadin.com>2012-11-13 16:29:01 +0200
commitad54bec291ebb929f55b4f9208ed29f018223659 (patch)
treea2e64210f6b0d322fd2a42f1377fceb86b4a6d64 /uitest/src
parentd65970d329249c6725ec0bafd46725405492e833 (diff)
downloadvaadin-framework-ad54bec291ebb929f55b4f9208ed29f018223659.tar.gz
vaadin-framework-ad54bec291ebb929f55b4f9208ed29f018223659.zip
Renamed uri fragment methods in Page to use UriFragment instead of Fragment (#10141)
Change-Id: I1c5826a667e718ec147807889082d27392cf44e8
Diffstat (limited to 'uitest/src')
-rw-r--r--uitest/src/com/vaadin/tests/TestBench.java8
-rw-r--r--uitest/src/com/vaadin/tests/application/RefreshStatePreserve.java12
-rw-r--r--uitest/src/com/vaadin/tests/components/ui/InitialFragmentEvent.java12
-rw-r--r--uitest/src/com/vaadin/tests/components/ui/UriFragmentTest.java10
-rw-r--r--uitest/src/com/vaadin/tests/minitutorials/v7a1/UsingUriFragments.java18
-rw-r--r--uitest/src/com/vaadin/tests/minitutorials/v7b1/AxessingWebPageAndBrowserInfoUI.java12
-rw-r--r--uitest/src/com/vaadin/tests/tickets/Ticket34.java12
7 files changed, 42 insertions, 42 deletions
diff --git a/uitest/src/com/vaadin/tests/TestBench.java b/uitest/src/com/vaadin/tests/TestBench.java
index ca343b9e2a..04472be847 100644
--- a/uitest/src/com/vaadin/tests/TestBench.java
+++ b/uitest/src/com/vaadin/tests/TestBench.java
@@ -29,7 +29,7 @@ import com.vaadin.data.util.HierarchicalContainer;
import com.vaadin.server.ExternalResource;
import com.vaadin.server.LegacyApplication;
import com.vaadin.server.Page;
-import com.vaadin.server.Page.FragmentChangedEvent;
+import com.vaadin.server.Page.UriFragmentChangedEvent;
import com.vaadin.ui.Component;
import com.vaadin.ui.CustomComponent;
import com.vaadin.ui.HorizontalSplitPanel;
@@ -131,10 +131,10 @@ public class TestBench extends com.vaadin.server.LegacyApplication implements
VerticalLayout lo = new VerticalLayout();
lo.addComponent(menu);
- mainWindow.getPage().addListener(new Page.FragmentChangedListener() {
+ mainWindow.getPage().addListener(new Page.UriFragmentChangedListener() {
@Override
- public void fragmentChanged(FragmentChangedEvent source) {
- String fragment = source.getFragment();
+ public void uriFragmentChanged(UriFragmentChangedEvent source) {
+ String fragment = source.getUriFragment();
if (fragment != null && !"".equals(fragment)) {
// try to find a proper test class
diff --git a/uitest/src/com/vaadin/tests/application/RefreshStatePreserve.java b/uitest/src/com/vaadin/tests/application/RefreshStatePreserve.java
index f4d7f2a4e4..34c102df7f 100644
--- a/uitest/src/com/vaadin/tests/application/RefreshStatePreserve.java
+++ b/uitest/src/com/vaadin/tests/application/RefreshStatePreserve.java
@@ -1,8 +1,8 @@
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.Page.UriFragmentChangedEvent;
+import com.vaadin.server.Page.UriFragmentChangedListener;
import com.vaadin.server.VaadinRequest;
import com.vaadin.tests.components.AbstractTestUI;
import com.vaadin.tests.util.Log;
@@ -20,11 +20,11 @@ public class RefreshStatePreserve extends AbstractTestUI {
addComponent(new Label("UI id: " + getUIId()));
addComponent(log);
- log.log("Initial fragment: " + getPage().getFragment());
- getPage().addFragmentChangedListener(new FragmentChangedListener() {
+ log.log("Initial fragment: " + getPage().getUriFragment());
+ getPage().addUriFragmentChangedListener(new UriFragmentChangedListener() {
@Override
- public void fragmentChanged(FragmentChangedEvent event) {
- log.log("Fragment changed to " + event.getFragment());
+ public void uriFragmentChanged(UriFragmentChangedEvent event) {
+ log.log("Fragment changed to " + event.getUriFragment());
}
});
}
diff --git a/uitest/src/com/vaadin/tests/components/ui/InitialFragmentEvent.java b/uitest/src/com/vaadin/tests/components/ui/InitialFragmentEvent.java
index b4a7d4e181..c9788b8540 100644
--- a/uitest/src/com/vaadin/tests/components/ui/InitialFragmentEvent.java
+++ b/uitest/src/com/vaadin/tests/components/ui/InitialFragmentEvent.java
@@ -1,7 +1,7 @@
package com.vaadin.tests.components.ui;
-import com.vaadin.server.Page.FragmentChangedEvent;
-import com.vaadin.server.Page.FragmentChangedListener;
+import com.vaadin.server.Page.UriFragmentChangedEvent;
+import com.vaadin.server.Page.UriFragmentChangedListener;
import com.vaadin.server.VaadinRequest;
import com.vaadin.tests.components.AbstractTestUI;
import com.vaadin.tests.util.Log;
@@ -15,10 +15,10 @@ public class InitialFragmentEvent extends AbstractTestUI {
@Override
protected void setup(VaadinRequest request) {
- getPage().addFragmentChangedListener(new FragmentChangedListener() {
+ getPage().addUriFragmentChangedListener(new UriFragmentChangedListener() {
- public void fragmentChanged(FragmentChangedEvent source) {
- String newFragment = source.getFragment();
+ public void uriFragmentChanged(UriFragmentChangedEvent source) {
+ String newFragment = source.getUriFragment();
log.log("Fragment changed from " + lastKnownFragment + " to "
+ newFragment);
lastKnownFragment = newFragment;
@@ -42,7 +42,7 @@ public class InitialFragmentEvent extends AbstractTestUI {
}
protected void setFragment(String fragment) {
- getPage().setFragment(fragment);
+ getPage().setUriFragment(fragment);
}
@Override
diff --git a/uitest/src/com/vaadin/tests/components/ui/UriFragmentTest.java b/uitest/src/com/vaadin/tests/components/ui/UriFragmentTest.java
index b1cfffd410..2172b00ee3 100644
--- a/uitest/src/com/vaadin/tests/components/ui/UriFragmentTest.java
+++ b/uitest/src/com/vaadin/tests/components/ui/UriFragmentTest.java
@@ -1,7 +1,7 @@
package com.vaadin.tests.components.ui;
import com.vaadin.server.Page;
-import com.vaadin.server.Page.FragmentChangedEvent;
+import com.vaadin.server.Page.UriFragmentChangedEvent;
import com.vaadin.server.VaadinRequest;
import com.vaadin.tests.components.AbstractTestUI;
import com.vaadin.ui.Button;
@@ -16,9 +16,9 @@ public class UriFragmentTest extends AbstractTestUI {
protected void setup(VaadinRequest request) {
addComponent(fragmentLabel);
updateLabel();
- getPage().addListener(new Page.FragmentChangedListener() {
+ getPage().addListener(new Page.UriFragmentChangedListener() {
@Override
- public void fragmentChanged(FragmentChangedEvent event) {
+ public void uriFragmentChanged(UriFragmentChangedEvent event) {
updateLabel();
}
});
@@ -26,13 +26,13 @@ public class UriFragmentTest extends AbstractTestUI {
new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
- getPage().setFragment("test");
+ getPage().setUriFragment("test");
}
}));
}
private void updateLabel() {
- String fragment = getPage().getFragment();
+ String fragment = getPage().getUriFragment();
if (fragment == null) {
fragmentLabel.setValue("No URI fragment set");
} else {
diff --git a/uitest/src/com/vaadin/tests/minitutorials/v7a1/UsingUriFragments.java b/uitest/src/com/vaadin/tests/minitutorials/v7a1/UsingUriFragments.java
index 5d7555a952..15c4fa838e 100644
--- a/uitest/src/com/vaadin/tests/minitutorials/v7a1/UsingUriFragments.java
+++ b/uitest/src/com/vaadin/tests/minitutorials/v7a1/UsingUriFragments.java
@@ -16,8 +16,8 @@
package com.vaadin.tests.minitutorials.v7a1;
-import com.vaadin.server.Page.FragmentChangedEvent;
-import com.vaadin.server.Page.FragmentChangedListener;
+import com.vaadin.server.Page.UriFragmentChangedEvent;
+import com.vaadin.server.Page.UriFragmentChangedListener;
import com.vaadin.server.VaadinRequest;
import com.vaadin.ui.Button;
import com.vaadin.ui.Button.ClickEvent;
@@ -36,26 +36,26 @@ public class UsingUriFragments extends UI {
@Override
protected void init(VaadinRequest request) {
Label label = new Label("Hello, your fragment is "
- + getPage().getFragment());
+ + getPage().getUriFragment());
getContent().addComponent(label);
// React to fragment changes
- getPage().addListener(new FragmentChangedListener() {
+ getPage().addListener(new UriFragmentChangedListener() {
@Override
- public void fragmentChanged(FragmentChangedEvent source) {
- handleFragment(source.getFragment());
+ public void uriFragmentChanged(UriFragmentChangedEvent source) {
+ handleFragment(source.getUriFragment());
}
});
// Handle the fragment received in the initial request
- handleFragment(getPage().getFragment());
+ handleFragment(getPage().getUriFragment());
addComponent(new Button("Show and set fragment",
new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
- handleFragment(getPage().getFragment());
- getPage().setFragment("customFragment");
+ handleFragment(getPage().getUriFragment());
+ getPage().setUriFragment("customFragment");
}
}));
}
diff --git a/uitest/src/com/vaadin/tests/minitutorials/v7b1/AxessingWebPageAndBrowserInfoUI.java b/uitest/src/com/vaadin/tests/minitutorials/v7b1/AxessingWebPageAndBrowserInfoUI.java
index 8623dd0b73..8fb7536190 100644
--- a/uitest/src/com/vaadin/tests/minitutorials/v7b1/AxessingWebPageAndBrowserInfoUI.java
+++ b/uitest/src/com/vaadin/tests/minitutorials/v7b1/AxessingWebPageAndBrowserInfoUI.java
@@ -19,8 +19,8 @@ package com.vaadin.tests.minitutorials.v7b1;
import com.vaadin.server.Page;
import com.vaadin.server.Page.BrowserWindowResizeEvent;
import com.vaadin.server.Page.BrowserWindowResizeListener;
-import com.vaadin.server.Page.FragmentChangedEvent;
-import com.vaadin.server.Page.FragmentChangedListener;
+import com.vaadin.server.Page.UriFragmentChangedEvent;
+import com.vaadin.server.Page.UriFragmentChangedListener;
import com.vaadin.server.VaadinRequest;
import com.vaadin.tests.components.AbstractTestUI;
import com.vaadin.ui.Notification;
@@ -43,11 +43,11 @@ public class AxessingWebPageAndBrowserInfoUI extends AbstractTestUI {
}
});
- page.setFragment(page.getFragment() + "foo");
- page.addFragmentChangedListener(new FragmentChangedListener() {
+ page.setUriFragment(page.getUriFragment() + "foo");
+ page.addUriFragmentChangedListener(new UriFragmentChangedListener() {
@Override
- public void fragmentChanged(FragmentChangedEvent event) {
- Notification.show("Fragment=" + event.getFragment());
+ public void uriFragmentChanged(UriFragmentChangedEvent event) {
+ Notification.show("Fragment=" + event.getUriFragment());
}
});
}
diff --git a/uitest/src/com/vaadin/tests/tickets/Ticket34.java b/uitest/src/com/vaadin/tests/tickets/Ticket34.java
index 18863273d1..dfeb83987d 100644
--- a/uitest/src/com/vaadin/tests/tickets/Ticket34.java
+++ b/uitest/src/com/vaadin/tests/tickets/Ticket34.java
@@ -5,7 +5,7 @@ import java.util.Map;
import com.vaadin.server.LegacyApplication;
import com.vaadin.server.Page;
-import com.vaadin.server.Page.FragmentChangedEvent;
+import com.vaadin.server.Page.UriFragmentChangedEvent;
import com.vaadin.ui.Button;
import com.vaadin.ui.Button.ClickEvent;
import com.vaadin.ui.Component;
@@ -32,14 +32,14 @@ public class Ticket34 extends LegacyApplication {
"Test app for URI fragment management/reading", mainLayout);
setMainWindow(mainWin);
- mainWin.getPage().addListener(new Page.FragmentChangedListener() {
+ mainWin.getPage().addListener(new Page.UriFragmentChangedListener() {
@Override
- public void fragmentChanged(FragmentChangedEvent event) {
+ public void uriFragmentChanged(UriFragmentChangedEvent event) {
getMainWindow().showNotification(
- "Fragment now: " + event.getFragment());
+ "Fragment now: " + event.getUriFragment());
// try to change to view mapped by fragment string
- setView(event.getFragment());
+ setView(event.getUriFragment());
}
});
@@ -95,7 +95,7 @@ public class Ticket34 extends LegacyApplication {
public void buttonClick(ClickEvent event) {
String viewName = tf.getValue().toString();
// fragmentChangedListener will change the view if possible
- event.getButton().getUI().getPage().setFragment(viewName);
+ event.getButton().getUI().getPage().setUriFragment(viewName);
}
});