/** * Force the resource bundle to reload, using the current locale, * and raise the org.jboss.seam.localeSelected event. */ public void select() { FacesContext.getCurrentInstance().getViewRoot().setLocale( getLocale() ); //Contexts.removeFromAllContexts("org.jboss.seam.core.resourceBundle"); Contexts.removeFromAllContexts("org.jboss.seam.international.messages"); setCookieValueIfEnabled( getLocaleString() ); if ( Events.exists() ) { Events.instance().raiseEvent( "org.jboss.seam.localeSelected", getLocaleString() ); } }
/** * Cancels the first workflow found on the current document * */ public String cancelRoute() throws ClientException { List<DocumentRoute> routes = getRelatedRoutes(); if (routes.size() == 0) { log.error("No workflow to cancel"); return null; } DocumentRoute route = routes.get(0); Framework.getLocalService(DocumentRoutingEngineService.class).cancel( route, documentManager); // force computing of tabs webActions.resetTabList(); Events.instance().raiseEvent(TaskEventNames.WORKFLOW_CANCELED); Contexts.removeFromAllContexts("relatedRoutes"); documentManager.save(); return navigationContext.navigateToDocument(navigationContext.getCurrentDocument()); }
/** * Recreate the JSF view, using the new theme, and raise the * org.jboss.seam.themeSelected event * */ public void select() { Contexts.removeFromAllContexts("org.jboss.seam.theme.theme"); FacesContext facesContext = FacesContext.getCurrentInstance(); String viewId = Pages.getViewId(facesContext); UIViewRoot viewRoot = facesContext.getApplication().getViewHandler().createView(facesContext, viewId); facesContext.setViewRoot(viewRoot); setCookieValueIfEnabled( getTheme() ); if ( Events.exists() ) { Events.instance().raiseEvent( "org.jboss.seam.themeSelected", getTheme() ); } }
public String cancelWorkflow(String wfName) throws NuxeoException { List<DocumentRoute> routes = getRelatedRoutes(); if (routes.size() == 0) { log.error("No workflow to cancel"); return null; } DocumentRoute route = getRunningWorkflowByName(routes, wfName); Task validateTask = getValidateTask(wfName); DocumentModel currentDoc = navigationContext.getCurrentDocument(); ToutaticeWorkflowHelper.notifyRecipients(documentManager, validateTask, currentDoc, null, ToutaticeGlobalConst.CST_EVENT_ONLINE_WF_CANCELED); Framework.getLocalService(DocumentRoutingEngineService.class).cancel(route, documentManager); // force computing of tabs webActions.resetTabList(); Events.instance().raiseEvent(TaskEventNames.WORKFLOW_CANCELED); Contexts.removeFromAllContexts("relatedRoutes"); documentManager.save(); return navigationContext.navigateToDocument(navigationContext.getCurrentDocument()); }
return null; Contexts.removeFromAllContexts("relatedRoutes"); Events.instance().raiseEvent(EventNames.DOCUMENT_CHILDREN_CHANGED, routeModel.getDocument());