Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6792029
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T17:55:07+00:00 2026-05-26T17:55:07+00:00

Since including <mvc:annotation-driven/> I have experienced a problem when binding the selections of multi-select

  • 0

Since including <mvc:annotation-driven/> I have experienced a problem when binding the selections of multi-select list box to its corresponding list property on the command bean. Before introducing <mvc:annotation-driven/> it worked correctly.

I have a custom collection editor:

@InitBinder
public void initBinder(WebDataBinder binder) {
   binder.registerCustomEditor(List.class, new CustomCollectionEditor(List.class) {
      protected Object convertElement(Object element) {         
         String fieldName = (String)element;

         for (Field field : fields) {
            if (field.getFieldName().equals(fieldName))
               return field;
         }

         return element;
      }
   });
}

which previously would result in the form controller receiving a List<Field> representing the list selections. However, since using the <mvc:annotation-driven/> what I now get is a List<List<Field>>.

Can anyone help shed light on this behaviour?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T17:55:08+00:00Added an answer on May 26, 2026 at 5:55 pm

    This might not be even close but…

    If you create your own AnnotationMethodHandlerAdapter to set a custom webBindingInitializer on it you need to have <mvc:annotation-driven /> after your AnnotationMethodHandlerAdapter, otherwise the one created by <mvc:annotation-driver /> will be in use and your custom binder won’t be in use.

    Try moving it if it isn’t already last.

    Other than that I can only suggest to set a break point inside your binder to see if it is called.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have a C# solution with ca. 55 projects, including test projects. Since part
I have started using Ninject 2 (downloaded from Github yesterday including the MVC extension
I have been studying, playing with and working with ASP.NET MVC since Preview 1
Since CS3 doesn't have a web service component, as previous versions had, is there
Our solution file contains many different projects including an ASP.NET MVC web app, a
I have been using Emacs since version 18. Emacs Lisp isn't my routine programming
Generally, MVC frameeworks have a structure that looks something like: /models /views /controllers /utils
Its been a long time since I had to do anything but minor fixes
Since Django urls are arbitrary, including those set when you create flatpages. How can
Since the vast majority of monitors are 16-bit color or more, including mobile devices

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.