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

Hi!

I think you’re looking for the
UriFragmentUtility
component.

For more information, search the forums for
UriFragmentUtility
,
url
and
bookmark
.

HTH,
/Jonatan

Thanks a lot!!! It works fine!!!