Announcement Announcement Module
Collapse
No announcement yet.
Using CustomEditorConfigurer for DataBinding Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Using CustomEditorConfigurer for DataBinding

    Hi!

    I want to use a custom editor for data binding.

    So far i know that i have to create a CustomEditorConfigurer in the application context like this:

    Code:
    <bean id="customEditorConfigurer" class="org.springframework.beans.factory.config.CustomEditorConfigurer">
        <property name="customEditors">
            <map>
                <entry />...
            </map>
        </property>
    </bean>
    To apply a custom editor to the DataBinder of a controller you need to overwrite the initBinder method of the BaseCommandController like this:

    Code:
    binder.registerCustomEditor(Any.class, customEditor);
    But i would like to configure custom editors via the application context.
    I could not find a solution so far.
    I thought it was Spring's idea to configure as much as possible in the app-context.

    Any ideas?

    Thanks in advance.

  • #2
    Sorry for pushing it up again but i am still looking for a solution.

    Comment

    Working...
    X