use of org.springframework.web.bind.annotation.InitBinder in project portal by ixinportal.
the class RecordHanderController method initBinder.
@InitBinder
public void initBinder(WebDataBinder binder) throws Exception {
DateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
CustomDateEditor dateEditor = new CustomDateEditor(df, true);
binder.registerCustomEditor(Date.class, dateEditor);
}
use of org.springframework.web.bind.annotation.InitBinder in project portal by ixinportal.
the class AbstractController method initBinder.
@InitBinder
public void initBinder(WebDataBinder binder) throws Exception {
DateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
CustomDateEditor dateEditor = new CustomDateEditor(df, true);
binder.registerCustomEditor(Date.class, dateEditor);
}
use of org.springframework.web.bind.annotation.InitBinder in project portal by ixinportal.
the class ActivityCollectService method initBinder.
@RequestMapping(value = "/amaccept.html", produces = "text/html")
@InitBinder
public void initBinder(WebDataBinder binder) throws Exception {
DateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
CustomDateEditor dateEditor = new CustomDateEditor(df, true);
binder.registerCustomEditor(Date.class, dateEditor);
}
use of org.springframework.web.bind.annotation.InitBinder in project Gemma by PavlidisLab.
the class GeneralSearchControllerImpl method initBinder.
@Override
@InitBinder
protected void initBinder(WebDataBinder binder) {
super.initBinder(binder);
binder.registerCustomEditor(Taxon.class, new TaxonPropertyEditor(this.taxonService));
}
use of org.springframework.web.bind.annotation.InitBinder in project components by Talend.
the class ControllersConfiguration method initBinder.
/**
* Initialise Web binders to be able to use {@link PropertyTrigger} in camel case in {@link PathVariable}.
*/
@InitBinder
protected void initBinder(WebDataBinder binder) {
binder.registerCustomEditor(PropertyTrigger.class, new PropertyEditorSupport() {
@Override
public void setAsText(String text) throws IllegalArgumentException {
String upperUnderscoreCased = CaseFormat.LOWER_CAMEL.converterTo(CaseFormat.UPPER_UNDERSCORE).convert(text);
PropertyTrigger propertyTrigger = PropertyTrigger.valueOf(upperUnderscoreCased);
setValue(propertyTrigger);
}
});
binder.registerCustomEditor(DefinitionType.class, new DefinitionTypeConverter());
binder.registerCustomEditor(ConnectorTypology.class, new ConnectorTypologyConverter());
}
Aggregations