@PathVariable Map<String, String> pathVars,
@PathVariable(value="id") String id,
@ModelAttribute(value="entityForm") EntityForm entityForm, BindingResult result,
RedirectAttributes ra) throws Exception {
// Attach the dynamic form info so that the update service will know how to split up the fields
DynamicEntityFormInfo info = new DynamicEntityFormInfo()
.withCeilingClassName(StructuredContentType.class.getName())
.withSecurityCeilingClassName(StructuredContent.class.getName())
.withCriteriaName("constructForm")
.withPropertyName("structuredContentType");
entityForm.putDynamicFormInfo("structuredContentType", info);
String returnPath = super.saveEntity(request, response, model, pathVars, id, entityForm, result, ra);
if (result.hasErrors()) {
info = entityForm.getDynamicFormInfo("structuredContentType");
info.setPropertyValue(entityForm.findField("structuredContentType").getValue());
//grab back the dynamic form that was actually put in
EntityForm inputDynamicForm = entityForm.getDynamicForm("structuredContentType");
EntityForm dynamicForm = getDynamicFieldTemplateForm(info, id, inputDynamicForm);