public void release() { RequestStateManager.remove(this, RequestStateManager.FACESCONTEXT_IMPL_ATTR_NAME); RequestStateManager.remove(this, RequestStateManager.CLIENT_ID_MESSAGES_NOT_DISPLAYED); released = true; externalContext = null; responseStream = null; responseWriter = null; componentMessageLists = null; renderResponse = false; responseComplete = false; viewRoot = null; // PENDING(edburns): write testcase that verifies that release // actually works. This will be important to keep working as // ivars are added and removed on this class over time. // Make sure to clear our ThreadLocal instance. setCurrentInstance(null); }
/** * <p> * Adds the specified key and value to the Map stored in the request. * If <code>value</code> is <code>null</code>, that key/value pair will * be removed from the Map. * </p> * * @param ctx the <code>FacesContext</code> for the current request * @param key the key for the value * @param value the value to store */ public static void set(FacesContext ctx, String key, Object value) { if (ctx == null || key == null) { return; } if (value == null) { remove(ctx, key); } ctx.getAttributes().put(key, value); }
/** * <p> * Adds the specified key and value to the Map stored in the request. * If <code>value</code> is <code>null</code>, that key/value pair will * be removed from the Map. * </p> * * @param ctx the <code>FacesContext</code> for the current request * @param key the key for the value * @param value the value to store */ public static void set(FacesContext ctx, String key, Object value) { if (ctx == null || key == null) { return; } if (value == null) { remove(ctx, key); } ctx.getAttributes().put(key, value); }
/** * <p> * Adds the specified key and value to the Map stored in the request. * If <code>value</code> is <code>null</code>, that key/value pair will * be removed from the Map. * </p> * * @param ctx the <code>FacesContext</code> for the current request * @param key the key for the value * @param value the value to store */ public static void set(FacesContext ctx, String key, Object value) { if (ctx == null || key == null) { return; } if (value == null) { remove(ctx, key); } ctx.getAttributes().put(key, value); }
/** * <p> * Adds the specified key and value to the Map stored in the request. * If <code>value</code> is <code>null</code>, that key/value pair will * be removed from the Map. * </p> * * @param ctx the <code>FacesContext</code> for the current request * @param key the key for the value * @param value the value to store */ public static void set(FacesContext ctx, String key, Object value) { if (ctx == null || key == null) { return; } if (value == null) { remove(ctx, key); } Map<String,Object> reqState = getStateMap(ctx); reqState.put(key, value); }
/** * <p> * Adds the specified key and value to the Map stored in the request. * If <code>value</code> is <code>null</code>, that key/value pair will * be removed from the Map. * </p> * * @param ctx the <code>FacesContext</code> for the current request * @param key the key for the value * @param value the value to store */ public static void set(FacesContext ctx, String key, Object value) { if (ctx == null || key == null) { return; } if (value == null) { remove(ctx, key); } ctx.getAttributes().put(key, value); }
/** * <p> * Creates and installs default validators, if any, into the argument * <code>EditableValueHolder</code>. This method is merely a utility * method to be called when there is no <code>ComponentValidators</code> * available, or there are no <code>ValidatorInfo</code> instances on the * stack. * </p> * * @param ctx the <code>FacesContext</code> for the current request * @param editableValueHolder the component receiving the <code>Validator</code>s */ @SuppressWarnings({"unchecked"}) public static void addDefaultValidatorsToComponent(FacesContext ctx, EditableValueHolder editableValueHolder) { if (ComponentSupport.isBuildingNewComponentTree(ctx)) { Set<String> keySet = ctx.getApplication().getDefaultValidatorInfo().keySet(); List<String> validatorIds = new ArrayList<String>(keySet.size()); Set<String> disabledValidatorIds = (Set<String>) RequestStateManager.remove(ctx, RequestStateManager.DISABLED_VALIDATORS); for (String key : keySet) { if (disabledValidatorIds != null && disabledValidatorIds.contains(key)) { continue; } validatorIds.add(key); } addValidatorsToComponent(ctx, validatorIds, editableValueHolder, null); } }
/** * <p> * Creates and installs default validators, if any, into the argument * <code>EditableValueHolder</code>. This method is merely a utility * method to be called when there is no <code>ComponentValidators</code> * available, or there are no <code>ValidatorInfo</code> instances on the * stack. * </p> * * @param ctx the <code>FacesContext</code> for the current request * @param editableValueHolder the component receiving the <code>Validator</code>s */ @SuppressWarnings({"unchecked"}) public static void addDefaultValidatorsToComponent(FacesContext ctx, EditableValueHolder editableValueHolder) { if (ComponentSupport.isBuildingNewComponentTree(ctx)) { Set<String> keySet = ctx.getApplication().getDefaultValidatorInfo().keySet(); List<String> validatorIds = new ArrayList<>(keySet.size()); Set<String> disabledValidatorIds = (Set<String>) RequestStateManager.remove(ctx, RequestStateManager.DISABLED_VALIDATORS); for (String key : keySet) { if (disabledValidatorIds != null && disabledValidatorIds.contains(key)) { continue; } validatorIds.add(key); } addValidatorsToComponent(ctx, validatorIds, editableValueHolder, null); } }
/** * <p> * Creates and installs default validators, if any, into the argument * <code>EditableValueHolder</code>. This method is merely a utility * method to be called when there is no <code>ComponentValidators</code> * available, or there are no <code>ValidatorInfo</code> instances on the * stack. * </p> * * @param ctx the <code>FacesContext</code> for the current request * @param editableValueHolder the component receiving the <code>Validator</code>s */ @SuppressWarnings({"unchecked"}) public static void addDefaultValidatorsToComponent(FacesContext ctx, EditableValueHolder editableValueHolder) { if (ComponentSupport.isBuildingNewComponentTree(ctx)) { Set<String> keySet = ctx.getApplication().getDefaultValidatorInfo().keySet(); List<String> validatorIds = new ArrayList<>(keySet.size()); Set<String> disabledValidatorIds = (Set<String>) RequestStateManager.remove(ctx, RequestStateManager.DISABLED_VALIDATORS); for (String key : keySet) { if (disabledValidatorIds != null && disabledValidatorIds.contains(key)) { continue; } validatorIds.add(key); } addValidatorsToComponent(ctx, validatorIds, editableValueHolder, null); } }
/** * <p> * Creates and installs default validators, if any, into the argument * <code>EditableValueHolder</code>. This method is merely a utility * method to be called when there is no <code>ComponentValidators</code> * available, or there are no <code>ValidatorInfo</code> instances on the * stack. * </p> * * @param ctx the <code>FacesContext</code> for the current request * @param editableValueHolder the component receiving the <code>Validator</code>s */ @SuppressWarnings({"unchecked"}) public static void addDefaultValidatorsToComponent(FacesContext ctx, EditableValueHolder editableValueHolder) { if (ComponentSupport.isBuildingNewComponentTree(ctx)) { Set<String> keySet = ctx.getApplication().getDefaultValidatorInfo().keySet(); List<String> validatorIds = new ArrayList<>(keySet.size()); Set<String> disabledValidatorIds = (Set<String>) RequestStateManager.remove(ctx, RequestStateManager.DISABLED_VALIDATORS); for (String key : keySet) { if (disabledValidatorIds != null && disabledValidatorIds.contains(key)) { continue; } validatorIds.add(key); } addValidatorsToComponent(ctx, validatorIds, editableValueHolder, null); } }
(Set) RequestStateManager.remove(facesContext, RequestStateManager.CLIENT_ID_MESSAGES_NOT_DISPLAYED), String.class);
RequestStateManager.remove(ctx, RequestStateManager.DISABLED_VALIDATORS); int count = validatorStack.size();
RequestStateManager.remove(ctx, RequestStateManager.DISABLED_VALIDATORS); int count = validatorStack.size();
RequestStateManager.remove(ctx, RequestStateManager.DISABLED_VALIDATORS); int count = validatorStack.size();
RequestStateManager.remove(ctx, RequestStateManager.DISABLED_VALIDATORS); int count = validatorStack.size();
RequestStateManager.remove(context, RequestStateManager.AFTER_VIEW_CONTENT); if (null != wrapper) { wrapper.flushToWriter(response.getWriter(),
RequestStateManager.remove(context, RequestStateManager.AFTER_VIEW_CONTENT); if (null != wrapper) { wrapper.flushToWriter(extContext.getResponseOutputWriter(),
ViewHandlerResponseWrapper wrapper = (ViewHandlerResponseWrapper) RequestStateManager.remove(context, AFTER_VIEW_CONTENT);
ViewHandlerResponseWrapper wrapper = (ViewHandlerResponseWrapper) RequestStateManager.remove(context, AFTER_VIEW_CONTENT);