Java Code Examples for com.google.gwt.http.client.URL#decode()
The following examples show how to use
com.google.gwt.http.client.URL#decode() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: JsFacade.java From actor-platform with GNU Affero General Public License v3.0 | 6 votes |
@UsedByApp public void handleLinkClick(Event event) { Element target = Element.as(event.getEventTarget()); String href = target.getAttribute("href"); if (href.startsWith("send:")) { String msg = href.substring("send:".length()); msg = URL.decode(msg); if (lastVisiblePeer != null) { messenger.sendMessage(lastVisiblePeer, msg); event.preventDefault(); } } else { if (JsElectronApp.isElectron()) { JsElectronApp.openUrlExternal(href); event.preventDefault(); } } }
Example 2
Source File: SectioningStatusPage.java From unitime with Apache License 2.0 | 5 votes |
private void checkLastQuery() { if (Window.Location.getParameter("q") != null) { iFilter.setValue(Window.Location.getParameter("q"), true); if (Window.Location.getParameter("t") != null) { if ("2".equals(Window.Location.getParameter("t"))) { iTabBar.selectTab(1); } else { iTabBar.selectTab(0); } } else { loadData(); } } else if (Window.Location.getHash() != null && !Window.Location.getHash().isEmpty()) { String hash = URL.decode(Window.Location.getHash().substring(1)); if (!hash.matches("^[0-9]+\\:?[0-9]*@?$")) { if (hash.endsWith("@")) { iFilter.setValue(hash.substring(0, hash.length() - 1), true); iTabBar.selectTab(1); } else if (hash.endsWith("$")) { iFilter.setValue(hash.substring(0, hash.length() - 1), true); iTabBar.selectTab(2); } else { iFilter.setValue(hash, true); loadData(); } } } else { String q = SectioningStatusCookie.getInstance().getQuery(iOnline); if (q != null) iFilter.setValue(q, true); int t = SectioningStatusCookie.getInstance().getTab(iOnline); if (t >= 0 && t < iTabBar.getTabCount()) { iTabBar.selectTab(t, false); iTabIndex = -1; } if (GWT_CONSTANTS.searchWhenPageIsLoaded() && q != null && !q.isEmpty()) loadData(); } }
Example 3
Source File: NaluPluginGWT.java From nalu with Apache License 2.0 | 4 votes |
@Override public String decode(String route) { return URL.decode(route); }
Example 4
Source File: GwtWaverefEncoder.java From swellrt with Apache License 2.0 | 4 votes |
@Override public String decode(String encodedValue) { return URL.decode(encodedValue); }
Example 5
Source File: UrlCodecImpl.java From requestor with Apache License 2.0 | 4 votes |
@Override public String decode(String encodedURL) { return URL.decode(encodedURL); }
Example 6
Source File: GwtWaverefEncoder.java From incubator-retired-wave with Apache License 2.0 | 4 votes |
@Override public String decode(String encodedValue) { return URL.decode(encodedValue); }
Example 7
Source File: Application.java From SensorWebClient with GNU General Public License v2.0 | 4 votes |
public static void finishStartup() { try { String currentUrl = URL.decode(Window.Location.getHref()); if (hasQueryString(currentUrl) && !isGwtHostedModeParameterOnly()) { String[] services = getDecodedParameters(SERVICES); String[] versions = getDecodedParameters(VERSIONS); String[] features = getDecodedParameters(FEATURES); String[] offerings = getDecodedParameters(OFFERINGS); String[] procedures = getDecodedParameters(PROCEDURES); String[] phenomenons = getDecodedParameters(PHENOMENONS); String[] options = getDecodedParameters("options"); TimeRange timeRange = createTimeRange(); String locale = Window.Location.getParameter("locale"); if (isLocaleOnly(services,versions,offerings,features,procedures,phenomenons,locale)) { return; } if ( !isAllParametersAvailable(services, versions, offerings, features, procedures, phenomenons)) { getToasterInstance().addErrorMessage(i18n.errorUrlParsing()); return; } if (timeRange.isSetStartAndEnd()) { fireNewTimeRangeEvent(timeRange); } PermalinkController permalinkController = new PermalinkController(); for (int i = 0; i < services.length; i++) { final String service = services[i]; final String version = versions[i]; final String offering = offerings[i]; final String procedure = procedures[i]; final String phenomenon = phenomenons[i]; final String feature = features[i]; SosTimeseries sosTimeseries = new SosTimeseries(); sosTimeseries.setFeature(new Feature(feature, service)); sosTimeseries.setOffering(new Offering(offering, service)); sosTimeseries.setPhenomenon(new Phenomenon(phenomenon,service)); sosTimeseries.setSosService(new SosService(service, version)); sosTimeseries.setProcedure(new Procedure(procedure, service)); GWT.log("Timeseries to load: " + sosTimeseries); TimeseriesRenderingOptions tsOptions = null; if (options != null && options.length > i) { tsOptions = createRenderingOptions(options[i]); GWT.log("with options: " + options[i]); permalinkController.addTimeseries(sosTimeseries, tsOptions); } else { permalinkController.addTimeseries(sosTimeseries); } SOSMetadataBuilder builder = new SOSMetadataBuilder() .addServiceURL(service) .addServiceVersion(version); SOSMetadata sosMetadata = new SOSMetadata(builder); getMainEventBus().fireEvent(new StoreSOSMetadataEvent(sosMetadata)); getMainEventBus().fireEvent(new GetPhenomenonsEvent.Builder(service).build()); getMainEventBus().fireEvent(new GetFeatureEvent(service, feature)); getMainEventBus().fireEvent(new GetOfferingEvent(service, offering)); getMainEventBus().fireEvent(new GetProcedureEvent(service, procedure)); getMainEventBus().fireEvent(new GetStationForTimeseriesEvent(sosTimeseries)); getMainEventBus().fireEvent(new GetStationsWithinBBoxEvent(service, null)); getMainEventBus().fireEvent(new NewSOSMetadataEvent()); } } else { showStationSelectorWhenConfigured(); } } catch (Exception e) { if ( !GWT.isProdMode()) { GWT.log("Error evaluating permalink!", e); } showStationSelectorWhenConfigured(); getToasterInstance().addErrorMessage(i18n.errorUrlParsing()); } finally { finalEvents(); } }