Announcement Announcement Module
No announcement yet.
Spring:bind Vs form:hidden Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring:bind Vs form:hidden

    What exactly is the difference between spring:bind and form:hidden tags?

    Do they both carry back the values to the controller? What is the best way to carry the selected values back to the controller when the form is submitted.

    I am currently using form:hidden. But not sure this is the recommended procedure.

  • #2
    spring:bind and form:hidden are mutually exclusive, you only need to use one of them. There is no recommended procedure per se but from my personal experience i'd say use form tags because they keep the jsp clean.

    As for carrying data through your command object, it depends on what you're trying to do. If you don't want the user to see the data being carried, use form:hidden.