@Deprecated protected boolean redirectHack(String text) { if (text != null && text.contains("<!-- ##Login page hack## -->")) { String redirectUrl = GWT.getHostPageBaseURL() + "Login.html?login-reauth"; Window.Location.replace(redirectUrl); return true; } return false; }
public void changeLocale( String locale ) { if( currentPlace == null ) return; String token = placeTokenizer.getToken( currentPlace ); Map<String, List<String>> curParams = new HashMap<String, List<String>>( Location.getParameterMap() ); ArrayList<String> value = new ArrayList<String>(); value.add( locale ); curParams.put( "locale", value ); String queryString = "?"; boolean fAddAnd = false; for( Entry<String, List<String>> e : curParams.entrySet() ) { if( fAddAnd ) queryString += "&"; fAddAnd = true; queryString += URL.encodeQueryString( e.getKey() ) + "=" + URL.encodeQueryString( HexaTools.arrayToString( e.getValue() ) ); } String url = Location.getProtocol() + "//" + Location.getHost() + Location.getPath() + queryString + "#" + token; Window.Location.replace( url ); }
public void changeLocale( String locale ) { if( currentPlace == null ) return; String token = placeTokenizer.getToken( currentPlace ); Map<String, List<String>> curParams = new HashMap<String, List<String>>( Location.getParameterMap() ); ArrayList<String> value = new ArrayList<String>(); value.add( locale ); curParams.put( "locale", value ); String queryString = "?"; boolean fAddAnd = false; for( Entry<String, List<String>> e : curParams.entrySet() ) { if( fAddAnd ) queryString += "&"; fAddAnd = true; queryString += URL.encodeQueryString( e.getKey() ) + "=" + URL.encodeQueryString( HexaTools.arrayToString( e.getValue() ) ); } String url = Location.getProtocol() + "//" + Location.getHost() + Location.getPath() + queryString + "#" + token; Window.Location.replace( url ); }
Window.Location.replace(param);
protected void handleUnauthorised(Response response) { RootPanel.get("loading").setVisible(false); if (broken) { return; } broken = true; // We need to remove the server address before we can use the header // Or stop using apache // String loginUrl = response.getHeader("login"); // if (loginUrl != null) // { String redirectUrl = GWT.getHostPageBaseURL() + "Login.html?login-reauth"; Window.Location.replace(redirectUrl); return; // } // GWT.log("Unauthorised Response"); // RootPanel.get("loading").setVisible(false); // MessageBox.dialogBox("Invalid Operation", "Please refresh your browser."); }
Window.Location.replace(logoutUrl);
protected void handleSuccessfulLogin(ClientSessionDTO result) { display.setUsername(""); display.setPassword(""); if (!switchAfterLogin) { unbind(); } if (redirectUrl != null && !redirectUrl.isEmpty()) { String sessionId = result.getSessionId(); String query = LoginUtils.getCommonQueryString(sessionId); RootPanel.get().clear(); Location.replace(redirectUrl + query); } if (switchAfterLogin) { display.setLoggedUser(result.getUser()); display.changeState(true); } }
@Override public void replace(String newUrl) { Window.Location.replace(newUrl); }
public void replaceToken(String historyToken) { Window.Location.replace("#" + historyToken); } }
public void replaceToken(String historyToken) { Window.Location.replace("#" + historyToken); }
@Override protected void handleSuccessfulLogin(ClientSessionDTO result) { display.setUsername(""); display.setPassword(""); unbind(); if (redirectUrl != null && !redirectUrl.isEmpty()) { String sessionId = result.getSessionId(); String query = LoginUtils.getCommonQueryString(sessionId); closePopup(redirectUrl != null ? redirectUrl + query : null); RootPanel.get().clear(); Location.replace(redirectUrl + query); } }
@Override public void replaceState(String data, String title, String url) { UrlBuilder builder = Window.Location.createUrlBuilder(); builder.setHash(data); Window.Location.replace(builder.buildString()); }
@Override public void replaceState(String data, String title, String url) { UrlBuilder builder = Window.Location.createUrlBuilder(); builder.setHash(data); Window.Location.replace(builder.buildString()); }
public void replaceToken(String historyToken) { Window.Location.replace("#" + historyToken); } }