/** * Returns all values filled in in the writable fields on the form. * * @throws InvalidValueException when a validation error occurs. */ public Map<String, String> getFormPropertyValues() throws InvalidValueException { // Commit the form to ensure validation is executed form.commit(); Map<String, String> formPropertyValues = new HashMap<String, String>(); // Get values from fields defined for each form property for (FormProperty formProperty : formProperties) { if (formProperty.isWritable()) { Field field = form.getField(formProperty.getId()); FormPropertyRenderer renderer = getRenderer(formProperty); String fieldValue = renderer.getFieldValue(formProperty, field); formPropertyValues.put(formProperty.getId(), fieldValue); } } return formPropertyValues; }