List of usage examples for org.springframework.validation DataBinder registerCustomEditor
@Override
public void registerCustomEditor(@Nullable Class<?> requiredType, @Nullable String field,
PropertyEditor propertyEditor)
From source file:com.jaspersoft.jasperserver.war.action.ReportDataSourceAction.java
protected void initBinder(RequestContext requestContext, DataBinder binder) { super.initBinder(requestContext, binder); binder.registerCustomEditor(String.class, "reportDataSource.beanMethod", new StringTrimmerEditor(true)); binder.registerCustomEditor(String.class, "reportDataSource.timezone", new StringTrimmerEditor(true)); }
From source file:com.jaspersoft.jasperserver.war.action.ReportJobEditAction.java
protected void initBinder(RequestContext context, DataBinder binder) { super.initBinder(context, binder); binder.registerCustomEditor(List.class, "mailNotification.toAddresses", mailAddressesEditor); binder.registerCustomEditor(List.class, "mailNotification.ccAddresses", mailAddressesEditor); binder.registerCustomEditor(List.class, "mailNotification.bccAddresses", mailAddressesEditor); // create a fresh date editor so that is uses the current locale CustomDateEditor customDateEditor = new CustomDateEditor( JasperServerUtil.createCalendarDateTimeFormat(getMessageSource()), true); binder.registerCustomEditor(Date.class, customDateEditor); binder.registerCustomEditor(Integer.class, customNumberEditor); binder.registerCustomEditor(Set.class, "outputFormats", byteSetEditor); binder.registerCustomEditor(SortedSet.class, "trigger.weekDays", byteSortedSetEditor); binder.registerCustomEditor(SortedSet.class, "trigger.months", byteSortedSetEditor); binder.registerCustomEditor(String.class, "contentRepositoryDestination.timestampPattern", new StringTrimmerEditor(true)); }