navigating to previous UIs

I am looking for multiwindow functionality to navigate to previous UIs and their state in V7. In V6, we could navigate to myapp/1 or myapp/2 and get its respective state based on UIID. If a user refreshes the same UI, they should get a new window/UI. If they specify an older UI window name,

Here’s an example of what I am trying in my UI extended class:


	protected void init(VaadinRequest request) {
		if (request.getParameter("uiid") != null && request.getParameter("uiid").length() > 0) {
			String windowName = request.getParameter("uiid");
			UI oldUI = this.getSession().getUIById(Integer.parseInt(windowName));
			if (oldUI != null) {
				// how do we forward on to the old UI?
				UI.getCurrent().setContent(oldUI.getContent()); // can I just forward on to the old UI instead of mirroring the old UI content?
				UI.setCurrent(oldUI);
				return;
			} 
		}
		
		initLayout();
	}

In the above, I was wondering if I can simply forward to the old ui if I have found it.

To customize how UI instance lookup is done you should create your own UIProvider.

From looking at the UIProvider examples, it looks like it is focused on providing different UIs for different devices (mobile etc). I am interested in providing previously created UIs based on a a request parameter. Looking up a previous UI instance looks straightforward but I’m not sure of the correct way to forward to it? Currently I am using with UI.getCurrent().setContent(oldUI.getContent()); as the code above shows.

I might have interpreted your question a bit wrong. Have you had a look at the built-in View and Navigator support (https://vaadin.com/wiki/-/wiki/Main/Creating%20a%20bookmarkable%20application%20with%20back%20button%20support).