@Override protected ServletRequestDataBinder createBinder(HttpServletRequest request, Object command) throws Exception { ServletRequestDataBinder servletRequestDataBinder = super.createBinder(request, command); AnagraficaObjectDTO commandDTO = (AnagraficaObjectDTO) command; for (String shortName : commandDTO.getAnagraficaProperties().keySet()) { TP tipologiaProprieta = applicationService.findPropertiesDefinitionByShortName( clazzTipologiaProprieta, shortName); PropertyEditor propertyEditor = tipologiaProprieta.getRendering().getPropertyEditor(applicationService); if (propertyEditor instanceof FilePropertyEditor) { ((FilePropertyEditor) propertyEditor) .setExternalAuthority(String.valueOf(commandDTO.getParentId())); ((FilePropertyEditor) propertyEditor) .setInternalAuthority(String.valueOf(tipologiaProprieta.getId())); } if (tipologiaProprieta.getRendering() instanceof WidgetCombo) { WidgetCombo<P, TP> combo = (WidgetCombo<P, TP>) tipologiaProprieta.getRendering(); for (int i = 0; i < 100; i++) { for (TP subtp : combo.getSottoTipologie()) { PropertyEditor subPropertyEditor = subtp.getRendering().getPropertyEditor(applicationService); if (subPropertyEditor instanceof FilePropertyEditor) { ((FilePropertyEditor) subPropertyEditor) .setExternalAuthority(String.valueOf(commandDTO.getParentId())); ((FilePropertyEditor) subPropertyEditor) .setInternalAuthority(String.valueOf(subtp.getId())); } String path = "anagraficaProperties[" + shortName + "][" + i + "].object.anagraficaProperties[" + subtp.getShortName() + "]"; servletRequestDataBinder.registerCustomEditor( ValoreDTO.class, path, new ValoreDTOPropertyEditor(subPropertyEditor)); servletRequestDataBinder.registerCustomEditor( Object.class, path + ".object", subPropertyEditor); logger.debug( "Registrato Wrapper del property editor: " + propertyEditor + " per il path (combo): " + path); logger.debug( "Registrato property editor: " + propertyEditor + " per il path (combo): " + path + ".object"); } } } else { String path = "anagraficaProperties[" + shortName + "]"; servletRequestDataBinder.registerCustomEditor( ValoreDTO.class, path, new ValoreDTOPropertyEditor(propertyEditor)); // per le checkbox servletRequestDataBinder.registerCustomEditor( Object.class, path + ".object", propertyEditor); logger.debug( "Registrato Wrapper del property editor: " + propertyEditor + " per il path: " + path); logger.debug( "Registrato property editor: " + propertyEditor + " per il path: " + path + ".object"); } } return servletRequestDataBinder; }