Refine search
private List<_FlowContextualInfo> getCurrentFlowStack(FacesContext context, ClientWindow clientWindow) { Map<String, Object> sessionMap = context.getExternalContext().getSessionMap(); String currentFlowMapKey = CURRENT_FLOW_STACK + clientWindow.getId(); List<_FlowContextualInfo> currentFlowStack = (List<_FlowContextualInfo>) sessionMap.get(currentFlowMapKey); return currentFlowStack; }
url = "#".equals(href) ? "#" : context.getExternalContext().encodeRedirectURL(href, outcomeTarget.getParams()); && outcomeTarget.isDisableClientWindow()) { clientWindow = context.getExternalContext().getClientWindow(); clientWindowRenderingModeEnabled = ((ClientWindow) clientWindow).isClientWindowRenderModeEnabled(context); ((ClientWindow) clientWindow).disableClientWindowRenderMode(context); url = context.getApplication().getViewHandler().getBookmarkableURL(context, toViewId, params, isIncludeViewParams); ((ClientWindow) clientWindow).enableClientWindowRenderMode(context);
@Override public Map<String, String> getQueryURLParameters(FacesContext facesContext) { return wrappedClientWindow.getQueryURLParameters(facesContext); }
private void renderState(FacesContext context) throws IOException { // Get the view state and write it to the response.. PartialViewContext pvc = context.getPartialViewContext(); PartialResponseWriter writer = pvc.getPartialResponseWriter(); String viewStateId = Util.getViewStateId(context); writer.startUpdate(viewStateId); String state = context.getApplication().getStateManager().getViewState(context); writer.write(state); writer.endUpdate(); ClientWindow window = context.getExternalContext().getClientWindow(); if (null != window) { String clientWindowId = Util.getClientWindowId(context); writer.startUpdate(clientWindowId); writer.write(window.getId()); writer.endUpdate(); } }
ExternalContext externalContext = facesContext.getExternalContext(); String tokenValue = (String) externalContext.getRequestMap().get(FLASH_RENDER_MAP_TOKEN); ClientWindow clientWindow = externalContext.getClientWindow(); if (clientWindow != null) if (facesContext.getApplication().getStateManager().isSavingStateInClient(facesContext)) Map<String, Object> sessionMap = externalContext.getSessionMap(); sessionMap.put(FLASH_RENDER_MAP_TOKEN+SEPARATOR_CHAR+clientWindow.getId(), tokenValue); lruMap.put(clientWindow.getId(), tokenValue);
String viewId = context.getViewRoot().getViewId(); String actionURL = context.getApplication().getViewHandler().getActionURL(context, viewId); ExternalContext externalContext = context.getExternalContext(); url.append("=true"); url.append("&ice.window="); url.append(externalContext.getClientWindow().getId()); url.append("&ice.view="); url.append(BridgeSetup.getViewID(externalContext)); String encodedPartialActionURL = externalContext.encodePartialActionURL(url.toString()); log.finer("RENDER ENCODED_URL clientId: " + clientId + " encodedPartialActionURL: " + encodedPartialActionURL); ResponseWriter writer = context.getResponseWriter();
ExternalContext externalContext = facesContext.getExternalContext(); Object session = facesContext.getExternalContext().getSession(false); ClientWindow clientWindow = externalContext.getClientWindow(); if (session != null && clientWindow != null) if (map.isEmpty()) if (facesContext.getApplication().getStateManager().isSavingStateInClient(facesContext)) Map<String, Object> sessionMap = externalContext.getSessionMap(); sessionMap.remove(FLASH_RENDER_MAP_TOKEN+SEPARATOR_CHAR+clientWindow.getId()); if (lruMap != null) lruMap.remove(clientWindow.getId()); Map<String, Object> sessionMap = externalContext.getSessionMap(); if (lruMap.isEmpty())
FacesContext context = FacesContext.getCurrentInstance(); ClientWindow cw = context.getExternalContext().getClientWindow(); boolean appendClientWindow = false; if (null != cw) { appendClientWindow = cw.isClientWindowRenderModeEnabled(context); String clientWindowId = cw.getId(); StringBuilder builder = new StringBuilder(url); int q = url.indexOf(UrlBuilder.QUERY_STRING_SEPARATOR); Map<String, String> additionalParams = cw.getQueryURLParameters(context); if (null != additionalParams) { for (Map.Entry<String, String> cur : additionalParams.entrySet()) {
ExternalContext externalContext = facesContext.getExternalContext(); String tokenValue = null; ClientWindow clientWindow = externalContext.getClientWindow(); if (clientWindow != null) if (facesContext.getApplication().getStateManager().isSavingStateInClient(facesContext)) Map<String, Object> sessionMap = externalContext.getSessionMap(); tokenValue = (String) sessionMap.get(FLASH_RENDER_MAP_TOKEN+ SEPARATOR_CHAR+clientWindow.getId()); if (lruMap != null) tokenValue = (String) lruMap.get(clientWindow.getId()); Cookie cookie = (Cookie) externalContext.getRequestCookieMap().get(FLASH_RENDER_MAP_TOKEN); if (cookie != null)
public static String lookupAssociatedWindowID(Map requestMap) { FacesContext facesContext = FacesContext.getCurrentInstance(); ExternalContext externalContext = facesContext.getExternalContext(); try { ClientWindow clientWindow = externalContext.getClientWindow(); if (clientWindow == null) { try { boolean customWindowTracking = !"url".equals(externalContext.getInitParameter("javax.faces.CLIENT_WINDOW_MODE")); String id = WindowScopeManager.determineWindowID(facesContext, customWindowTracking); if (customWindowTracking) { clientWindow = new CustomClientWindow(id); clientWindow.disableClientWindowRenderMode(facesContext); externalContext.setClientWindow(clientWindow); } } catch (Exception e) { log.log(Level.FINE, "Unable to set up WindowScope ", e); } } return clientWindow == null ? null : clientWindow.getId(); } catch (UnsupportedOperationException e) { //exception thrown when ExternalContext.getClientWindow() is called during application startup return null; } }
static FlowDeque<Flow> getFlowStack(FacesContext context) { FlowDeque<Flow> result = null; ExternalContext extContext = context.getExternalContext(); String sessionKey = extContext.getClientWindow().getId() + "_flowStack"; Map<String, Object> sessionMap = extContext.getSessionMap(); result = (FlowDeque<Flow>) sessionMap.get(sessionKey); if (null == result) { result = new FlowDeque<Flow>(sessionKey); sessionMap.put(sessionKey, result); } return result; }
public void createCurrentFlowScope(FacesContext facesContext) { ClientWindow cw = facesContext.getExternalContext().getClientWindow(); String baseKey = cw.getId(); FlowHandler flowHandler = facesContext.getApplication().getFlowHandler(); Flow flow = flowHandler.getCurrentFlow(facesContext); String flowMapKey = FlowUtils.getFlowMapKey(facesContext, flow); List<String> activeFlowKeys = activeFlowMapKeys.get(baseKey); if (activeFlowKeys == null) { activeFlowKeys = new ArrayList<String>(); } activeFlowKeys.add(0, flowMapKey); activeFlowMapKeys.put(baseKey, activeFlowKeys); refreshClientWindow(facesContext); }
@Override protected String getOrCreateWindowId(FacesContext facesContext) { if (facesContext.getExternalContext().getClientWindow() != null) { return facesContext.getExternalContext().getClientWindow().getId(); } return null; } }
if (context.getExternalContext().getClientWindow() != null) context.getExternalContext().getClientWindow().isClientWindowRenderModeEnabled(context); context.getExternalContext().getClientWindow().disableClientWindowRenderMode(context); context.getExternalContext().getClientWindow().enableClientWindowRenderMode(context);
@Override public void attachWindow(FacesContext facesContext) { ClientWindow clientWindow = facesContext.getExternalContext().getClientWindow(); if (clientWindow == null) { clientWindow = getClientWindowFactory().getClientWindow(facesContext); } if (clientWindow != null) { clientWindow.decode(facesContext); facesContext.getExternalContext().setClientWindow(clientWindow); } }
@Override public void render(FacesContext facesContext) throws FacesException { lazyInit(); // prevent jfwid rendering boolean delegateWindowHandling = ClientWindowConfig.ClientWindowRenderMode.DELEGATED.equals( clientWindowConfig.getClientWindowRenderMode(facesContext)); if (!delegateWindowHandling && facesContext.getExternalContext().getClientWindow() != null) { facesContext.getExternalContext().getClientWindow().disableClientWindowRenderMode(facesContext); } super.render(facesContext); }
private List<_FlowContextualInfo> getCurrentReturnModeFlowStack(FacesContext context, ClientWindow clientWindow, String stackKey) { Map<Object, Object> attributesMap = context.getAttributes(); String currentFlowMapKey = stackKey + clientWindow.getId(); List<_FlowContextualInfo> currentFlowStack = (List<_FlowContextualInfo>) attributesMap.get(currentFlowMapKey); return currentFlowStack; }
if ((clientWindow != null) && clientWindow.isClientWindowRenderModeEnabled(facesContext)) { urlBuilder.append(clientWindow.getId()); Map<String, String> queryURLParameters = clientWindow.getQueryURLParameters(facesContext);
@Override public void disableClientWindowRenderMode(FacesContext context) { getWrapped().disableClientWindowRenderMode(context); }
@Override public String getClientWindowFlowId(ClientWindow curWindow) { String result = null; result = curWindow.getId() + "_" + getId(); return result; }