List of usage examples for org.springframework.web.multipart.support ByteArrayMultipartFileEditor ByteArrayMultipartFileEditor
ByteArrayMultipartFileEditor
From source file:de.ingrid.iplug.excel.controller.SwitchXlsController.java
@InitBinder public void initBinder(final WebDataBinder binder) { binder.registerCustomEditor(byte[].class, new ByteArrayMultipartFileEditor()); }
From source file:it.jugpadova.controllers.AdminLinkedEventController.java
@InitBinder protected void initBinder(WebDataBinder binder) throws Exception { binder.registerCustomEditor(Date.class, new CustomDateEditor(new SimpleDateFormat("dd/MM/yyyy"), true)); binder.registerCustomEditor(byte[].class, new ByteArrayMultipartFileEditor()); }
From source file:com.opencredo.portlet.BooksController.java
@InitBinder protected void initBinder(PortletRequestDataBinder binder) { SimpleDateFormat dateFormat = new SimpleDateFormat("MM/dd/yyyy", Locale.US); binder.registerCustomEditor(Date.class, new CustomDateEditor(dateFormat, true)); binder.registerCustomEditor(byte[].class, new ByteArrayMultipartFileEditor()); binder.setAllowedFields(/* w w w .j a va2s. c o m*/ new String[] { "author", "title", "description", "availability", "count", "website", "coverPng" }); }
From source file:sample.portlet.BookEditController.java
@Override protected void initBinder(PortletRequest request, PortletRequestDataBinder binder) { SimpleDateFormat dateFormat = new SimpleDateFormat("MM/dd/yyyy", Locale.US); binder.registerCustomEditor(Date.class, new CustomDateEditor(dateFormat, true)); binder.registerCustomEditor(byte[].class, new ByteArrayMultipartFileEditor()); binder.setAllowedFields(/*from w w w.ja v a 2s . com*/ new String[] { "author", "title", "description", "availability", "count", "website", "coverPng" }); }
From source file:com.benfante.minimark.controllers.CourseController.java
@InitBinder public void initBinder(WebDataBinder binder) throws Exception { binder.registerCustomEditor(byte[].class, new ByteArrayMultipartFileEditor()); }
From source file:it.jugpadova.controllers.EventEditController.java
@InitBinder public void initBinder(WebDataBinder binder) throws Exception { binder.registerCustomEditor(Date.class, new CustomDateEditor(new SimpleDateFormat("dd/MM/yyyy"), true)); binder.registerCustomEditor(Date.class, "registration.startRegistration", new CustomDateEditor(new SimpleDateFormat("dd/MM/yyyy HH:mm"), true)); binder.registerCustomEditor(Date.class, "registration.endRegistration", new CustomDateEditor(new SimpleDateFormat("dd/MM/yyyy HH:mm"), true)); binder.registerCustomEditor(byte[].class, new ByteArrayMultipartFileEditor()); }
From source file:bd.gov.forms.web.FormBuilder.java
@InitBinder protected void initBinder(HttpServletRequest request, ServletRequestDataBinder binder) throws ServletException { binder.registerCustomEditor(byte[].class, new ByteArrayMultipartFileEditor()); }
From source file:sample.portlet.BookAddController.java
@Override protected void initBinder(PortletRequest request, PortletRequestDataBinder binder) throws Exception { SimpleDateFormat dateFormat = new SimpleDateFormat("MM/dd/yyyy", Locale.US); binder.registerCustomEditor(Date.class, new CustomDateEditor(dateFormat, true)); binder.registerCustomEditor(byte[].class, new ByteArrayMultipartFileEditor()); binder.setAllowedFields(/*from w w w . j av a2 s .c o m*/ new String[] { "author", "title", "description", "availability", "count", "website", "coverPng" }); }
From source file:no.dusken.aranea.admin.control.UploadFileController.java
protected void initBinder(HttpServletRequest request, ServletRequestDataBinder binder) throws Exception { super.initBinder(request, binder); // to actually be able to convert Multipart instance to byte[] // we have to register a custom editor binder.registerCustomEditor(byte[].class, new ByteArrayMultipartFileEditor()); // binder.setBindEmptyMultipartFiles(false); // now Spring knows how to handle multipart object and convert them }
From source file:no.dusken.aranea.admin.control.issue.EditIssueController.java
protected void initBinder(HttpServletRequest request, ServletRequestDataBinder binder) throws Exception { super.initBinder(request, binder); binder.registerCustomEditor(Calendar.class, timeEditor); // to actually be able to convert Multipart instance to byte[] // we have to register a custom editor binder.registerCustomEditor(byte[].class, new ByteArrayMultipartFileEditor()); binder.setBindEmptyMultipartFiles(false); // now Spring knows how to handle multipart object and convert them }