/** * Some browsers may not use given filename. */ public static void downloadJsonFile(String json, String filename) { Window.open("data:application/octet-stream;" + "headers=Content-Disposition: attachment; filename=\"" + filename + "\"," + json, "_self", "enabled"); }
@Override public boolean openURI (String URI) { if (config.openURLInNewWindow) { Window.open(URI, "_blank", null); } else { Window.Location.assign(URI); } return true; }
@Override public boolean openURI (String URI) { if (config.openURLInNewWindow) { Window.open(URI, "_blank", null); } else { Window.Location.assign(URI); } return true; }
@Override public void onLogin() { Window.open(Window.Location.getPath(), "_blank", ""); }
/** * Export CTL schema. * * @param key the CTL export key */ public static void exportCtlSchema(String key) { String getUrl = composeUrl(KAA_CTL_EXPORT_SERVLET_PATH, CTL_EXPORT_KEY_PARAMETER + "=" + URL.encodeQueryString(key)); String url = GWT.getModuleBaseURL() + getUrl; Window.open(url, "_self", "enabled"); }
@Override public void onClick(ClickEvent clickEvent) { String url = Window.Location.getHref(); Window.open("/kaaAdmin/servlet/kaaConfigurationDownloadServlet?schemaId=" + Utils.getSchemaIdFromUrl(url) + "&endGroupId=" + Utils.getEndpointGroupIdFromUrl(url), "_blank", "status=0,toolbar=0,menubar=0,location=0"); } });
/** * Download the SDK. * * @param key the SDK key */ public static void downloadSdk(String key) { String getUrl = composeUrl(KAA_SDK_SERVLET_PATH, SDK_KEY_PARAMETER + "=" + URL.encodeQueryString(key)); String url = GWT.getModuleBaseURL() + getUrl; Window.open(url, "_self", "enabled"); }
/** * Download endpoint configuration. * * @param endpointKeyHash the endpoint key hash */ public static void downloadEndpointConfiguration(String endpointKeyHash) { String getUrl = composeUrl(EP_CONF_SERVLET_PATH, ENDPOINT_KEY_PARAMETER + "=" + URL.encodeQueryString(endpointKeyHash)); String url = GWT.getModuleBaseURL() + getUrl; Window.open(url, "_self", "enabled"); }
/** * Download record library. * * @param key the record library key */ public static void downloadRecordLibrary(String key) { String getUrl = composeUrl(KAA_RECORD_LIBRARY_SERVLET_PATH, RECORD_KEY_PARAMETER + "=" + URL.encodeQueryString(key)); String url = GWT.getModuleBaseURL() + getUrl; Window.open(url, "_self", "enabled"); }
/** * Download endpoint profile. * * @param endpointKey the endpoint key * @param type the type of an endpoint */ public static void downloadEndpointProfile(String endpointKey, ProfileType type) { String getUrl = composeUrl(KAA_PROFILE_DOWNLOAD_SERVLET_PATH, ENDPOINT_KEY_PARAMETER + "=" + URL.encodeQueryString(endpointKey), PROFILE_TYPE_PARAMETER + "=" + URL.encodeQueryString(type.name())); String url = GWT.getModuleBaseURL() + getUrl; Window.open(url, "_self", "enabled"); }
/** * Download user configuration. * * @param externalUId the external user identifier * @param schemaVersion the configuration schema version * @param appId the application identifier */ public static void downloadUserConfiguration(String externalUId, String schemaVersion, String appId) { String getUrl = composeUrl(KAA_USER_CONFIGURATION_SERVLET_PATH, APPLICATION_ID_PARAMETER + "=" + URL.encodeQueryString(appId), USER_EXTERNAL_ID_PARAMETER + "=" + URL.encodeQueryString(externalUId), CONFIGURATION_SCHEMA_ID + "=" + URL.encodeQueryString(schemaVersion)); String url = GWT.getModuleBaseURL() + getUrl; Window.open(url, "_self", "enabled"); }
@Override public void onClick(ClickEvent event) { Window.open("http://research.petalslink.org/display/petalsbpm", "_blank", ""); } });
/** * @see playn.core.Platform#openURL(java.lang.String) */ @Override public void openURL(String url) { Window.open(url, "_blank", ""); }
public void viewDocumentById(String resourceId) { final String url = getResourceUrl(resourceId); if (url != null && !url.isEmpty()) { Window.open(url, "_blank", ""); } } }
public static void openRulePopup(final String ruleIdOrKey, final String htmlFeatures) { String url = urlForRule(ruleIdOrKey, false); Window.open(url, "rule", htmlFeatures); } }
public void onClick(ClickEvent event) { String helpUrl = GWT.getHostPageBaseURL() + i18n.helpPath(); Window.open(helpUrl, "", ""); } });
public void onClick(com.smartgwt.client.widgets.events.ClickEvent event) { String helpUrl = GWT.getHostPageBaseURL() + i18n.helpPath(); Window.open(helpUrl, "", ""); } });
public void update(int index, JarListPageRow row, String value) { Window.open(getFileDownloadURL(row.getPath()), "downloading", "resizable=no,scrollbars=yes,status=no"); } });
@Override public void onSuccess(String result) { // On success get documentID back from GWT Servlet// // We need to get the base url and strip the gwt module name . String baseUrl = GWT.getHostPageBaseURL(); baseUrl = baseUrl.replaceFirst(GWT.getModuleName() + "/", ""); KSBlockingProgressIndicator.removeTask(loadDataTask); Window.open(baseUrl + "exportDownloadHTTPServlet?exportId="+result + "&format=" + format, "", ""); }
public void onRecordDoubleClick(RecordDoubleClickEvent event) { String id = event.getRecord().getAttribute(FLD_GEODESKID); //FIXME: preview URL String url = GeodeskUrlUtil.createPreviewUrl(id); com.google.gwt.user.client.Window.open(url, "_blank", null); } });