/** * Replace the current history token on top of the browsers history stack. * * <p>Note: This method has problems. The URL is updated with window.location.replace, * this unfortunately has side effects when using the deprecated iframe linker * (ie. "std" linker). Make sure you are using the cross site iframe linker when using * this method in your code. * * <p>Calling this method will cause * {@link ValueChangeHandler#onValueChange(com.google.gwt.event.logical.shared.ValueChangeEvent)} * to be called as well. * * @param historyToken history token to replace current top entry */ public static void replaceItem(String historyToken) { replaceItem(historyToken, true); }
/** * Replace the current history token on top of the browsers history stack. * * <p>Note: This method has problems. The URL is updated with window.location.replace, * this unfortunately has side effects when using the deprecated iframe linker * (ie. "std" linker). Make sure you are using the cross site iframe linker when using * this method in your code. * * <p>Calling this method will cause * {@link ValueChangeHandler#onValueChange(com.google.gwt.event.logical.shared.ValueChangeEvent)} * to be called as well. * * @param historyToken history token to replace current top entry */ public static void replaceItem(String historyToken) { replaceItem(historyToken, true); }
/** * Replace the current history token on top of the browsers history stack. * * <p>Note: This method has problems. The URL is updated with window.location.replace, * this unfortunately has side effects when using the deprecated iframe linker * (ie. "std" linker). Make sure you are using the cross site iframe linker when using * this method in your code. * * <p>Calling this method will cause * {@link ValueChangeHandler#onValueChange(com.google.gwt.event.logical.shared.ValueChangeEvent)} * to be called as well. * * @param historyToken history token to replace current top entry */ public static void replaceItem(String historyToken) { replaceItem(historyToken, true); }
/** * Update the fragment parameters of the current visible place. This will cause a NEW item to be added to the * browser history so the back button will take you back to the previous fragment parameters on the same place. * @param params key value pairs containing the key and the value of the parameters. Valid keys are defined in * {@link FragmentParams} * @param newItem true to insert new item into History, false to simply replace current URL without adding * to history */ public void setFragmentParameters(Map<String, String> params, boolean newItem) { PlaceRequest request = new PlaceRequest.Builder().nameToken( getCurrentPlaceRequest().getNameToken()).with(params).build(); if (newItem) { History.newItem(buildHistoryToken(request), false); } else { History.replaceItem(buildHistoryToken(request), false); } }