Uploaded image for project: 'Spring Web Flow'
  1. Spring Web Flow
  2. SWF-1234

Spring 3 Type Conversion and Formatting Integration



      Currently Spring Web Flow applications rely on a type conversion system that is different from the mechanism used in Spring MVC, which relied on the java.beans.PropertyEditor abstraction. Spring 3 offers a modern type conversion mechanism influenced by Web Flow's type conversion mechanism. Of interest to web applications is the Formatter SPI and the annotation-driven formatting:


      The purpose of this ticket is to integrate the new Spring conversion system into Web Flow such that Web Flow applications can take advantage of it and use a single type conversion mechanism. The specific goals are:

      1. Replace the default Web Flow converters with Spring 3 converters
      2. Make it possible to continue to use existing custom Web Flow converters
      3. Make it possible for applications to start relying on Spring 3 formatters and formatting annotations

      After this change all type conversion in Web Flow will rely on Spring's type conversion system. Existing custom converters can be registered as before via registered via GenericConversionService.addConverter(Converter converter). Such converters will be adapted and registered for use withing Spring's type conversion system.

      Web Flow also provides support for named converters that can be added via GenericConversionService.addConverter(String id, Converter converter). Such converters can then be used in conjunction with data binding. Named converters will continue to be supported for backwards compatibility but will be deprecated and will not result in the use of Spring's type conversion mechanism.

      Why applications should consider rewriting existing custom converters? Formatters are smart with regards to generics, formatting annotations (including custom annotations) provide fine-grained control over formatting, a single mechanism can be used across Spring MVC and Spring Web Flow.


          Issue Links



              • Assignee:
                rstoya05-aop Rossen Stoyanchev
                rstoya05-aop Rossen Stoyanchev
              • Votes:
                0 Vote for this issue
                1 Start watching this issue


                • Created: