Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

TUTORIALVaadin lets you build secure, UX-first PWAs entirely in Java.
Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Calling javascript synchronously by Enver Haase, 1 month ago
Level window and update explorer's URL
Hi!
I try to create an application-level window but when I click on a button to change the window, the explorer's URL doesn't update.
Here is my code :
public class ButtonClick implements ClickListener{
private static final long serialVersionUID = 1L;
@Override
public void buttonClick(ClickEvent event) {
if(getWindow("Home")==null){
Window window = new Window("Home");
window.setName("Home");
VerticalLayout vl = (VerticalLayout) window.getContent();
vl.addComponent(menu);
vl.setComponentAlignment(menu, Alignment.MIDDLE_CENTER);
home = new Home(user);
vl.addComponent(home);
vl.setExpandRatio(home, 1.0f);
addWindow(window);
}
else{
VerticalLayout vl = (VerticalLayout) getWindow("Home").getContent();
vl.addComponent(menu);
vl.setComponentAlignment(menu, Alignment.MIDDLE_CENTER);
vl.addComponent(home);
vl.setExpandRatio(home, 1.0f);
}
home.update();
er = new ExternalResource(getWindow("Home").getURL().toString());
getMainWindow().open(er);
}
}
I try by making a link instead a button and it works fine but I'd like to change my window before open it what I can't do with a link, isn't it?
Do you have a solution?
Thanks.
Julie
Last updated on
Hi!
I think you're looking for the UriFragmentUtility component.
For more information, search the forums for UriFragmentUtility, url and bookmark.
HTH,
/Jonatan
Last updated on Mar, 3rd 2010
You cannot reply to this thread.