final String url = "http://www.google.com";
@Override
protected void setup(VaadinRequest request) {
final Page page = getPage();
addComponent(new TestForWindowOpen());
addComponent(new Button("Page.open _blank always as popup",
new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
page.open(url, "_blank", true);
}
}));
addComponent(new Button("Page.open _blank NOT always as popup",
new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
page.open(url, "_blank", false);
}
}));
addComponent(new Button("Page.open _new always as popup",
new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
page.open(url, "_new", true);
}
}));
addComponent(new Button("Page.open _new NOT always as popup",
new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
page.open(url, "_new", false);
}
}));
addComponent(new Button(
"Execute Javascript window.open(www.google.com, _blank)",
new Button.ClickListener() {