public static UIComponent findUIInstructionChildByTagId(FacesContext context, UIComponent parent, String id) { UIComponent result = null; if (isBuildingNewComponentTree(context)) { return null; } Map<Object, Object> attrs = context.getAttributes(); if (attrs.containsKey(PartialStateSaving)) { if ((Boolean)attrs.get(PartialStateSaving)) { result = findChildByTagId(context, parent, id); } } return result; }
public static UIComponent findUIInstructionChildByTagId(FacesContext context, UIComponent parent, String id) { UIComponent result = null; if (isBuildingNewComponentTree(context)) { return null; } Map<Object, Object> attrs = context.getAttributes(); if (attrs.containsKey(PartialStateSaving)) { if ((Boolean)attrs.get(PartialStateSaving)) { result = findChildByTagId(context, parent, id); } } return result; }
public static UIComponent findUIInstructionChildByTagId(FacesContext context, UIComponent parent, String id) { UIComponent result = null; if (isBuildingNewComponentTree(context)) { return null; } Map<Object, Object> attrs = context.getAttributes(); if (attrs.containsKey(PartialStateSaving)) { if ((Boolean)attrs.get(PartialStateSaving)) { result = findChildByTagId(context, parent, id); } } return result; }
public static UIComponent findUIInstructionChildByTagId(FacesContext context, UIComponent parent, String id) { UIComponent result = null; if (isBuildingNewComponentTree(context)) { return null; } Map<Object, Object> attrs = context.getAttributes(); if (attrs.containsKey(PartialStateSaving)) { if ((Boolean)attrs.get(PartialStateSaving)) { result = findChildByTagId(context, parent, id); } } return result; }
/** * <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<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); } }
if (isBuildingNewComponentTree(context)) { return null;