Announcement Announcement Module
Collapse
No announcement yet.
conditional field binding Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • conditional field binding

    Hi,

    Annotated @InitBinder method lets me disallow some fields before binding and validation.

    Is there any way to force binding field A inside annotated @InitBinder method and based on this value disallow binding field B ?

    At a glance:
    Value of one field should determine binding another field.

    How can I achieve that?

    Greetings!

  • #2
    Originally posted by fuss View Post
    Is there any way to force binding field A inside annotated @InitBinder method and based on this value disallow binding field B ?

    Code:
    @InitBinder
    public void init(WebDataBinder binder, @RequestParam("fieldA") Boolean fieldA) {
      if(fieldA) {
        //disallow fieldB from binder
      }
    }

    Comment


    • #3
      Works Great

      Thank You!

      Greetings!

      Comment

      Working...
      X