/** * Adds a new browser level window to this application. * * @param uI * the UI window to add to the application */ public void addWindow(LegacyWindow uI) { if (uI.getName() == null) { String name = Integer.toString(namelessUIIndex++); uI.setName(name); } uI.setApplication(this); legacyUINames.put(uI.getName(), uI); uI.setSession(VaadinSession.getCurrent()); }
/** * Gets the full URL of the window. The returned URL is window specific and * can be used to directly refer to the window. * <p> * Note! This method can not be used for portlets. * </p> * * @return the URL of the window or null if the window is not attached to an * application */ public URL getURL() { LegacyApplication application = getApplication(); if (application == null) { return null; } try { return new URL(application.getURL(), getName() + "/"); } catch (MalformedURLException e) { throw new RuntimeException( "Internal problem getting window URL, please report"); } }