Results 1 to 2 of 2

Thread: Using CustomEditorConfigurer for DataBinding

  1. #1
    Join Date
    Jun 2006
    Posts
    2

    Default 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. #2
    Join Date
    Jun 2006
    Posts
    2

    Default

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •