Announcement Announcement Module
Collapse
No announcement yet.
global date & time format and annotated format Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • global date & time format and annotated format

    I'm using Spring WebFlow 2.3.1 and Spring 3.2.0.
    I've defined a global date & time format both for use in the MVC and WebFlow to display dates in the format yyyy-MM-dd

    Code:
        <bean id="conversionService"
              class="org.springframework.format.support.FormattingConversionServiceFactoryBean">
            <property name="formatters">
                <set>
                    <bean class="org.springframework.format.datetime.DateFormatter">
                    	<property name="pattern" value="yyyy-MM-dd"/>
                    </bean>
                </set>
            </property>
        </bean>
    
        <mvc:annotation-driven conversion-service="conversionService"/>
    
        <webflow:flow-builder-services id="flowBuilderServices"	view-factory-creator="viewFactoryCreator" conversion-service="defaultConversionService"/>
    
        <bean id="defaultConversionService" class="org.springframework.binding.convert.service.DefaultConversionService">
        	<constructor-arg ref="conversionService"/>
        </bean>
    While this work in general I'd like to be able to override the default annotating the model like
    Code:
    public class ModelInfo implements Serializable {
    	
    	@DateTimeFormat(pattern = "MM/dd/yyyy")
    	private Date date = new Date();
    Can this be accomplished in any way?

    Thanks.

  • #2
    WHAT DOES THIS PART OF THE CODE INDICATE
    <webflow:flow-builder-services id="flowBuilderServices" view-factory-creator="viewFactoryCreator" conversion-service="defaultConversionService"/>








    ----------------------------


    http://www.hotelsuninternational.com..._In_Delhi.html

    Comment

    Working...
    X