List of usage examples for com.google.gwt.user.client Cookies getCookie
public static String getCookie(String name)
From source file:ru.codeinside.gses.vaadin.client.VAppletIntegration.java
License:Mozilla Public License
/** * Get default appletParameters for the applet. * * @return/*from ww w.j a v a 2 s .co m*/ */ private Map<String, String> getDefaultIntegrationParameters() { Map<String, String> res = new HashMap<String, String>(); // Add default appletParameters res.put(PARAM_APPLET_ID, "" + getAppletId()); res.put(PARAM_PAINTABLE_ID, "" + getPaintableId()); String sessionId = appletSession; if (sessionId == null) { sessionId = Cookies.getCookie("JSESSIONID"); } res.put(PARAM_APP_SESSION, "JSESSIONID=" + sessionId); res.put(PARAM_APP_DEBUG, ApplicationConfiguration.isDebugMode() ? "true" : "false"); res.put(PARAM_APP_URL, GWT.getHostPageBaseURL()); String prefix = client.getAppUri(); if (prefix == null) { prefix = ""; } res.put(PARAM_ACTION_URL, GWT.getHostPageBaseURL() + action.substring(prefix.length())); return res; }
From source file:tv.dyndns.kishibe.qmaclone.client.UserData.java
License:Open Source License
public void load() { String s = Cookies.getCookie(KEY_USER_CODE); if (Strings.isNullOrEmpty(s) || 8 < s.length() || s.equals("0")) { createUserCode();/*from w ww. ja va2s.com*/ return; } data.userCode = Integer.parseInt(s); loadFromServer(); }
From source file:uk.ac.ebi.fg.annotare2.web.gwt.user.client.UserApp.java
License:Apache License
private void showNotice() { if (!"YEZ".equalsIgnoreCase(Cookies.getCookie(NOTICE_COOKIE))) { NotificationPopupPanel.warning(/* w w w .j a v a2s. c o m*/ "Due to scheduled maintenance we will not be able to provide accession numbers or curate experiments from 1pm today until Tue 31 May.<br><br>" + "You can still submit your experiments as usual and we will queue them for curation next week. Sorry for any inconvenience!", false, false); Cookies.setCookie(NOTICE_COOKIE, "YEZ"); } }
From source file:votes.client.oauth.CookieStoreImpl.java
License:Apache License
@Override public String get(String key) { return Cookies.getCookie(COOKIE_PREFIX + key); }