Spring Framework JodaDateTimeFormatAnnotationFormatterFactory - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Spring Framework JodaDateTimeFormatAnnotationFormatterFactory class.

This code example shows how to use the following methods:
        AttachmentListResultBean target = new AttachmentListResultBean();
        DataBinder binder = new DataBinder(target);
 
        // set the conversion service to convert the date 
        DefaultFormattingConversionService conversionService = new DefaultFormattingConversionService();
        conversionService.addFormatterForFieldAnnotation(new JodaDateTimeFormatAnnotationFormatterFactory());
        binder.setConversionService(conversionService);
 
        binder.bind(values);
 
        System.out.println(target);
 
        assertEquals("RELEASE", target.getUSERACTION());
 
        List attachmentList = target.getATTACHMENTS();
        assertNotNull(attachmentList);
        assertEquals(1, attachmentList.size());
 
        AttachmentInfo info = (AttachmentInfo) attachmentList.get(0);
        assertEquals("var_attachmentID", info.getAttachmentID());
3
CodeRank