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 6322317
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T16:18:28+00:00 2026-05-24T16:18:28+00:00

There are two major means of data binding initialization, but there is a drawback

  • 0

There are two major means of data binding initialization, but there is a drawback in the oldschool one, that I can’t figure out. This annotation way is great :

@InitBinder("order")
public void initBinder(WebDataBinder binder) {
    // Problem is that I want to set allowed and restricted fields - can be done here
    binder.setAllowedFields(allowedFields.split(","));
}

but I can’t be done with ConfigurableWebBindingInitializer. First off, the binder instance is created in AnnotationMethodHandlerAdapter and initializer is passed the binder instance somewhere in HandlerMethodInvoker so I can’t set it up… I can’t do something like this :

<bean id="codesResolver" class="org.springframework.validation.DefaultMessageCodesResolver" />
<bean id="binder" class="org.springframework.web.portlet.bind.PortletRequestDataBinder" scope="prototype">
    <property name="allowedFields" value="${allowedFields}" />
    <aop:scoped-proxy />
</bean>
<bean id="webBindingInitializer" class="org.springframework.web.bind.support.ConfigurableWebBindingInitializer">
    <property name="messageCodesResolver" ref="codesResolver" />
</bean>

Because binder instance is passed into it in handlerAdapter. How can I set up the binder then ?

  • 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-24T16:18:29+00:00Added an answer on May 24, 2026 at 4:18 pm

    There is no way of setting it up in xml configuration. You must implement your custom WebBindingInitializer … The ConfigurableWebBindingInitializer is obviously missing the possibility of setting up allowed and restricted fields…

    Or you can vote up SPR-8601

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

Sidebar

Related Questions

There are two major refactoring tools which can be installed for Visual Studio that
Is there any major difference between the two? Is there anything that can be
There seems to be two major conventions for organizing project files and then many
There are two databases in SQL Server 2005: One called A and another one
There are two pictureboxes with two different images. If I click on one picture
I guess there are two major approaches to date representations in XML: <date>1984-10-27</date> and
There are two major fix engines: opensource QuickFix http://www.quickfixengine.org/ commercial Fix Antenna http://www.b2bits.com/trading_solutions/fix_engines/fix_engine_cpp.html What
Are there any major differences between the two? I have yet to see a
Checking the Xerces-C++ webpage , I saw there are two major branches of the
There are two ways to implement overloads. The first one is to do everything

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.