private Object copyBeanAndPopulateWithCandidateValues(FacesContext context, ValueExpression wholeBeanVE, Object wholeBean, String copierType, Map<String, Map<String, Object>> candidate) { // Populate the bean copy with the validated values from the candidate Map<String, Object> propertiesToSet = new HashMap<>(); for (Entry<String, Map<String, Object>> propertyEntry : candidate.entrySet()) { propertiesToSet.put(propertyEntry.getKey(), propertyEntry.getValue().get("value")); } // Copy the whole bean so that class-level validation can be performed // without corrupting the real whole bean Object wholeBeanCopy = getCopier(context, copierType) .copy(wholeBean); if (wholeBeanCopy == null) { throw new FacesException("Unable to copy bean from " + wholeBeanVE.getExpressionString()); } setProperties(wholeBeanCopy, propertiesToSet); return wholeBeanCopy; }
private Object copyBeanAndPopulateWithCandidateValues(FacesContext context, ValueExpression wholeBeanVE, Object wholeBean, String copierType, Map<String, Map<String, Object>> candidate) { // Populate the bean copy with the validated values from the candidate Map<String, Object> propertiesToSet = new HashMap<>(); for (Entry<String, Map<String, Object>> propertyEntry : candidate.entrySet()) { propertiesToSet.put(propertyEntry.getKey(), propertyEntry.getValue().get("value")); } // Copy the whole bean so that class-level validation can be performed // without corrupting the real whole bean Object wholeBeanCopy = getCopier(context, copierType) .copy(wholeBean); if (wholeBeanCopy == null) { throw new FacesException("Unable to copy bean from " + wholeBeanVE.getExpressionString()); } setProperties(wholeBeanCopy, propertiesToSet); return wholeBeanCopy; }
private Object copyBeanAndPopulateWithCandidateValues(FacesContext context, ValueExpression wholeBeanVE, Object wholeBean, String copierType, Map<String, Map<String, Object>> candidate) { // Populate the bean copy with the validated values from the candidate Map<String, Object> propertiesToSet = new HashMap<>(); for (Entry<String, Map<String, Object>> propertyEntry : candidate.entrySet()) { propertiesToSet.put(propertyEntry.getKey(), propertyEntry.getValue().get("value")); } // Copy the whole bean so that class-level validation can be performed // without corrupting the real whole bean Object wholeBeanCopy = getCopier(context, copierType) .copy(wholeBean); if (wholeBeanCopy == null) { throw new FacesException("Unable to copy bean from " + wholeBeanVE.getExpressionString()); } setProperties(wholeBeanCopy, propertiesToSet); return wholeBeanCopy; }