if (hash != null && hash.length() > 0) { builder.setHash(URL.decodeQueryString(hash));
@Override public IsUrlBuilder setHash(String hash) { b.setHash(hash); return this; }
@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()); }
if (hash != null && hash.length() > 0) { builder.setHash(URL.decodeQueryString(hash));
if (hash != null && hash.length() > 0) { builder.setHash(URL.decodeQueryString(hash));
public static void open(ResourceId formId, ResourceId recordId) { String printUrl = Window.Location.createUrlBuilder() .setHash("print/form/" + formId.asString() + "/" + recordId.asString()).buildString(); Window.open(printUrl, "_blank", ""); } }
public static String localeUrl(ApplicationLocale applicationLocale) { // We use the sub-delim '+' extensively in fragment identifiers, // for example: // #data-entry/Activity+53432 // UrlBuilder will decode and re-encode this resulting in // #data-entry/Activity%2053432 // Which will break navigation // So we will first construct the url without the hash, // and then append the already-encoded fragment identifier directly String url = Window.Location.createUrlBuilder() .setParameter("locale", applicationLocale.getCode()) .setHash(null) .buildString(); return url + Window.Location.getHash(); }
private void openTable(SelectEvent event) { if(treeView.getSelectedEntry().isLoaded() && treeView.getSelectedEntry().get().isPresent()) { CatalogEntry catalogEntry = treeView.getSelectedEntry().get().get(); if(catalogEntry.getType() == CatalogEntryType.FORM) { String url = Window.Location.createUrlBuilder().setHash("table/" + catalogEntry.getId()).buildString(); Window.open(url, null, null); } else if(catalogEntry.getType() == CatalogEntryType.ANALYSIS) { String url = Window.Location.createUrlBuilder().setHash("analysis/" + catalogEntry.getId()).buildString(); Window.open(url, null, null); } } }
public static String localeUrl(ApplicationLocale applicationLocale) { // We use the sub-delim '+' extensively in fragment identifiers, // for example: // #data-entry/Activity+53432 // UrlBuilder will decode and re-encode this resulting in // #data-entry/Activity%2053432 // Which will break navigation // So we will first construct the url without the hash, // and then append the already-encoded fragment identifier directly String url = Window.Location.createUrlBuilder() .setParameter("locale", applicationLocale.getCode()) .setHash(null) .buildString(); return url + Window.Location.getHash(); }
private void onImport(SelectEvent event) { // Redirect to old app for the moment. UrlBuilder importUrl = Window.Location.createUrlBuilder(); importUrl.setHash("#import/" + viewModel.getFormId().asString()); importUrl.removeParameter("ui"); Window.open(importUrl.buildString(), "_blank", null); }