private void handleRequestParameter(VaadinRequest request) { boolean updateURL = false; for (RequestParameterHandler handler : requestHandlerList) { if (handler.handleRequest(request)) { updateURL = true; } } // we redo the layout before we save the history m_graphContainer.redoLayout(); m_topologyComponent.getState().setPhysicalWidth(0); m_topologyComponent.getState().setPhysicalHeight(0); m_topologyComponent.markAsDirtyRecursive(); // Close all open Windows/Dialogs if it is not the "NO VERTICES IN FOCUS"-Window for (Window eachWindow : getWindows()) { if (eachWindow != m_noContentWindow) { eachWindow.close(); } } if (updateURL) { // If we have a new location, we reload the page. // This needs to be done to set the fragment of the page correctly // Otherwise the Request-Parameters would still be there // we must overwrite the existing saved history for this user, otherwise updateURL does not work String fragment = m_historyManager.saveOrUpdateHistory(m_applicationContext.getUsername(), m_graphContainer); LOG.info("Redirect user {} to topology fragment url with fragment {}", m_applicationContext.getUsername(), fragment); getPage().setLocation(String.format("%s#%s", ((VaadinServletRequest) request).getRequestURI(), fragment)); } }
private void handleRequestParameter(VaadinRequest request) { boolean updateURL = false; for (RequestParameterHandler handler : requestHandlerList) { if (handler.handleRequest(request)) { updateURL = true; } } // we redo the layout before we save the history m_graphContainer.redoLayout(); m_topologyComponent.getState().setPhysicalWidth(0); m_topologyComponent.getState().setPhysicalHeight(0); m_topologyComponent.markAsDirtyRecursive(); // Close all open Windows/Dialogs if it is not the "NO VERTICES IN FOCUS"-Window for (Window eachWindow : getWindows()) { if (eachWindow != m_noContentWindow) { eachWindow.close(); } } if (updateURL) { // If we have a new location, we reload the page. // This needs to be done to set the fragment of the page correctly // Otherwise the Request-Parameters would still be there // we must overwrite the existing saved history for this user, otherwise updateURL does not work String fragment = m_historyManager.saveOrUpdateHistory(m_applicationContext.getUsername(), m_graphContainer); LOG.info("Redirect user {} to topology fragment url with fragment {}", m_applicationContext.getUsername(), fragment); getPage().setLocation(String.format("%s#%s", ((VaadinServletRequest) request).getRequestURI(), fragment)); } }