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; }
@Override public String getClientWindowFlowId(ClientWindow curWindow) { String result = null; result = curWindow.getId() + "_" + getId(); return result; }
private _FlowContextualInfo popFlowReferenceReturnMode(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); if (currentFlowStack == null) { return null; } return currentFlowStack.size() > 0 ? currentFlowStack.remove(currentFlowStack.size()-1) : null; }
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; }
@Override public String getId() { return getWrapped().getId(); }
@Override public String getId() { return getWrapped().getId(); }
@Override public String getClientWindowFlowId(ClientWindow curWindow) { String result = null; result = curWindow.getId() + "_" + getId(); return result; }
public String getId() { return getWrapped().getId(); }
@Override public String getClientWindowFlowId(ClientWindow curWindow) { String result = null; result = curWindow.getId() + "_" + getId(); return result; }
private void pushFlowReferenceReturnMode(FacesContext context, ClientWindow clientWindow, String stackKey, _FlowContextualInfo flowReference) { Map<Object, Object> attributesMap = context.getAttributes(); String currentFlowMapKey = stackKey + clientWindow.getId(); List<_FlowContextualInfo> currentFlowStack = (List<_FlowContextualInfo>) attributesMap.get(currentFlowMapKey); if (currentFlowStack == null) { currentFlowStack = new ArrayList<_FlowContextualInfo>(4); attributesMap.put(currentFlowMapKey, currentFlowStack); } currentFlowStack.add(flowReference); }
@Override public String getId() { return getWrapped().getId(); }
@Override public String getClientWindowFlowId(ClientWindow curWindow) { String result = null; result = curWindow.getId() + "_" + getId(); return result; }
@Override public String getClientWindowFlowId(ClientWindow curWindow) { String id = getId(); String documentId = getDefiningDocumentId(); // Faces Flow relies on ClientWindow feature, so it should be enabled, // and the expected id cannot be null. String windowId = curWindow.getId(); StringBuilder sb = new StringBuilder( id.length() + 1 + windowId.length() ); sb.append(windowId).append('_').append(documentId).append('_').append(id); return sb.toString(); }
@Override protected String getOrCreateWindowId(FacesContext facesContext) { if (facesContext.getExternalContext().getClientWindow() != null) { return facesContext.getExternalContext().getClientWindow().getId(); } return null; } }
@Override protected String getOrCreateWindowId(FacesContext facesContext) { if (facesContext.getExternalContext().getClientWindow() != null) { return facesContext.getExternalContext().getClientWindow().getId(); } 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; }
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<>(sessionKey); sessionMap.put(sessionKey, result); } return result; }
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<>(sessionKey); sessionMap.put(sessionKey, result); } return result; }
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<>(sessionKey); sessionMap.put(sessionKey, result); } return result; }
private void writeWindowIdField(FacesContext facesContext, ResponseWriter responseWriter) throws IOException { ClientWindow clientWindow = facesContext.getExternalContext().getClientWindow(); if (clientWindow != null) { responseWriter.startElement(HTML.INPUT_ELEM, null); responseWriter.writeAttribute(HTML.TYPE_ATTR, HTML.INPUT_TYPE_HIDDEN, null); responseWriter.writeAttribute(HTML.ID_ATTR, generateUpdateClientWindowId(facesContext), null); responseWriter.writeAttribute(HTML.NAME_ATTR, ResponseStateManager.CLIENT_WINDOW_PARAM, null); responseWriter.writeAttribute(HTML.VALUE_ATTR, clientWindow.getId(), null); responseWriter.endElement(HTML.INPUT_ELEM); } }