Announcement Announcement Module
Collapse
No announcement yet.
Calling Conversion Service When Redirecting to View Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Calling Conversion Service When Redirecting to View

    Hello Everyone,

    I have been struggling for some time with Spring MVC and I started my own project. I want to use every possible "good practice" there is.

    I managed to register my converters , using:
    Code:
    <bean id="conversionService"
    	  class="org.springframework.context.support.ConversionServiceFactoryBean">
    	    <property name="converters">
    	        <list merge="true">
    	            <bean class="controller.conversion.UserCategoryConverter"/>
    	            <bean class="controller.conversion.UserCategoryStringConverter"/>
    	        </list>
    	    </property>
    </bean>
    It works very well - when a form is submitted, the converter is called and it does its job - loading a domain object, by string.

    My question is - how do we do the vice verso ?

    I want Spring to call the necessary convertors, when I redirect to the view, so I can convert Domain Objects back to Strings and show them in the JSP form.

    Thank You.

    Best Regards,

    Alexander
Working...
X