List of usage examples for com.google.gwt.user.client Cookies removeCookie
public static void removeCookie(String name)
From source file:org.ednovo.gooru.client.mvp.assessments.play.collection.AssessmentsPlayerPresenter.java
License:Open Source License
/** * This method is used to remove cookie values after reading the values. *//*from ww w. jav a 2s .c om*/ public void removeCookieValues() { Cookies.removeCookie(getCookieKey() + "-assessmentSessionId"); Cookies.removeCookie(getCookieKey() + "-assessmentActivityEventId"); Cookies.removeCookie(getCookieKey() + "-assessmentNewDataLogEventId"); Cookies.removeCookie(getCookieKey() + "-assessmentStartTime"); Cookies.removeCookie(getCookieKey() + "-isAssessmentRefreshed"); Cookies.removeCookie(getCookieKey() + "-assessmentActivityEventId"); Cookies.removeCookie(getCookieKey() + "-assessmentResourceStartTime"); Cookies.removeCookie(getCookieKey() + "-assessmentDataLogEventId"); }
From source file:org.ednovo.gooru.client.mvp.folder.toc.FolderTocView.java
License:Open Source License
/** * This method will set the folder meta data on the toc page. * @param foldersTocObj/*from www . j a v a 2 s .c o m*/ */ void setFolderMetaData(FolderTocDo foldersTocObj) { PlaceRequest placeRequest = AppClientFactory.getPlaceManager().getPreviousRequest(); //This is used for handling folder toc back button code if (placeRequest != null && !PlaceTokens.ASSESSMENT_PLAY.equalsIgnoreCase(placeRequest.getNameToken()) && !PlaceTokens.COLLECTION_PLAY.equalsIgnoreCase(placeRequest.getNameToken()) && !PlaceTokens.FOLDER_TOC.equalsIgnoreCase(placeRequest.getNameToken())) { String paramerersString = ""; Set<String> parameters = placeRequest.getParameterNames(); if (parameters.size() > 0) { for (String paramString : parameters) { paramerersString = paramerersString + paramString + "=" + placeRequest.getParameter(paramString, null) + "&"; } } Cookies.removeCookie(BACK2TOC); if (StringUtil.isEmpty(paramerersString)) { //If we click the view all or list all button form the library Cookies.setCookie(BACK2TOC, placeRequest.getNameToken()); } else { //If we click the view all or list all button form the my collection or profile Cookies.setCookie(BACK2TOC, placeRequest.getNameToken() + "#" + paramerersString); } } if (foldersTocObj != null) { if (!StringUtil.isEmpty(foldersTocObj.getIdeas())) { bigIdeasPanel.setVisible(true); lblBigIdeas.getElement().setInnerHTML(foldersTocObj.getIdeas()); } else { bigIdeasPanel.setVisible(false); } if (!StringUtil.isEmpty(foldersTocObj.getQuestions())) { essentialPanel.setVisible(true); lblEssentalQuestions.getElement().setInnerHTML(foldersTocObj.getQuestions()); } else { essentialPanel.setVisible(false); } if (!StringUtil.isEmpty(foldersTocObj.getPerformanceTasks())) { performancePanel.setVisible(true); lblPerformanceTasks.getElement().setInnerHTML(foldersTocObj.getPerformanceTasks()); } else { performancePanel.setVisible(false); } lblFolderTitle.setText(StringUtil.truncateText(StringUtil.removeHtml(foldersTocObj.getTitle()), 50)); String profId = AppClientFactory.getPlaceManager().getRequestParameter(USER_ID, null); if (profId != null) { getUiHandlers().getProfilePageDetails(profId); } setBreadCrumbsText(bannerTitle.getText(), lblFolderTitle.getText()); } }
From source file:org.eeint.client.panels.TopPanel.java
License:Apache License
public TopPanel() { usernameInfo.setStyleName("sessionInfo"); sessionInfo.setWidget(0, 0, usernameInfo); sessionInfo.setWidget(0, 1, signOutButton); signOutButton.addSelectionListener(new SelectionListener<ButtonEvent>() { @Override//from w ww . j a va 2 s . c o m public void componentSelected(ButtonEvent ce) { Cookies.removeCookie("user"); MainEntryPoint.get().logout(); } }); Button enBtn = new Button(); enBtn.setIconStyle("enIcon"); Button plBtn = new Button(); plBtn.setIconStyle("plIcon"); Button esBtn = new Button(); esBtn.setIconStyle("esIcon"); Button deBtn = new Button(); deBtn.setIconStyle("deIcon"); enBtn.addSelectionListener(new SelectionListener<ButtonEvent>() { public native void componentSelected(ButtonEvent ce) /*-{ var currLocation = $wnd.location.toString().split("?"); var currLocale = "?locale=en"; $wnd.location.href = currLocation[0] + currLocale; $wnd.location.replace(currLocation[0] + currLocale); }-*/; }); plBtn.addSelectionListener(new SelectionListener<ButtonEvent>() { public native void componentSelected( ButtonEvent ce) /*-{ var currLocation = $wnd.location.toString().split("?"); var currLocale = "?locale=pl"; $wnd.location.href = currLocation[0] + currLocale; $wnd.location.replace(currLocation[0] + currLocale); }-*/; }); esBtn.addSelectionListener(new SelectionListener<ButtonEvent>() { public native void componentSelected(ButtonEvent ce) /*-{ var currLocation = $wnd.location.toString().split("?"); var currLocale = "?locale=es"; $wnd.location.href = currLocation[0] + currLocale; $wnd.location.replace(currLocation[0] + currLocale); }-*/; }); deBtn.addSelectionListener(new SelectionListener<ButtonEvent>() { public native void componentSelected(ButtonEvent ce) /*-{ var currLocation = $wnd.location.toString().split("?"); var currLocale = "?locale=de"; $wnd.location.href = currLocation[0] + currLocale; $wnd.location.replace(currLocation[0] + currLocale); }-*/; }); languageSelection.setCellSpacing(4); languageSelection.setWidget(0, 0, enBtn); languageSelection.setWidget(0, 1, plBtn); languageSelection.setWidget(0, 2, deBtn); languageSelection.setWidget(0, 3, esBtn); wrapper.setWidget(1, 0, sessionInfo); wrapper.setWidget(0, 0, languageSelection); wrapper.getCellFormatter().setVerticalAlignment(0, 0, HasVerticalAlignment.ALIGN_TOP); wrapper.getCellFormatter().setVerticalAlignment(1, 0, HasVerticalAlignment.ALIGN_BOTTOM); wrapper.getCellFormatter().setHorizontalAlignment(0, 0, HasHorizontalAlignment.ALIGN_RIGHT); wrapper.getCellFormatter().setHorizontalAlignment(1, 0, HasHorizontalAlignment.ALIGN_RIGHT); wrapper.setWidth("100%"); wrapper.setHeight("60px"); wrapper.setCellPadding(5); this.add(wrapper); setStyleName("topPanel"); setHeight(60); }
From source file:org.javahispano.javaleague.client.application.widget.footer.FooterPresenter.java
License:Apache License
private void resetLoggedInCookie() { Cookies.removeCookie(ApiParameters.LOGIN_COOKIE); logger.info("HeaderPresenter.resetLoggedInCookie(): The cookie was removed from client."); }
From source file:org.jboss.as.console.client.core.Preferences.java
License:Open Source License
public static void clear(Key key) { Cookies.removeCookie(COOKIE_PREFIX + key.getToken()); }
From source file:org.jboss.as.console.client.shared.Preferences.java
License:Open Source License
public static void clear(Key key) { Cookies.removeCookie(AS7_UI + key.getToken()); }
From source file:org.jboss.errai.workspaces.client.framework.CookiePreferences.java
License:Apache License
public void clear(String key) { Cookies.removeCookie(key); }
From source file:org.libredraw.client.Logout.java
License:Open Source License
@UiHandler("logoutButton") void onLogoutButtonClick(ClickEvent event) { String sessionId = Cookies.getCookie("SID"); LibreRPCService.endSession(sessionId, new AsyncCallback<String>() { public void onFailure(Throwable caught) { TableView.registerErrorDialog(new StackTrace(caught)); }//from ww w .j a va 2 s .com public void onSuccess(String result) { Cookies.removeCookie("SID"); Login.navigateTo(); } }); }
From source file:org.mklab.taskit.client.activity.TaskitActivity.java
License:Apache License
/** * {@inheritDoc}/*from ww w .ja va2 s .c o m*/ */ @Override public final void logout() { if (getClientFactory().getGlobalEventListener().isListening()) { getClientFactory().getGlobalEventListener().unlisten(); } /* * ????????Activity#onStop()???????????????? * ?? * * ?????? */ getClientFactory().getPlaceController().goTo(Login.INSTANCE); try { getClientFactory().getRequestFactory().accountRequest().logout().fire(); } catch (Throwable e) { showErrorDialog(e); } finally { Cookies.removeCookie(LoginActivity.COOKIE_AUTO_LOGIN_KEY); } this.clientFactory.initialize(); }
From source file:org.nuxeo.ecm.platform.gwt.client.ui.login.LogoutCommand.java
License:Apache License
@Override protected void doExecute() throws Throwable { post("/login/").send(); Cookies.removeCookie("JSESSIONID"); }