Announcement Announcement Module
Collapse
No announcement yet.
Disabled input's binding Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Disabled input's binding

    There is an input field at jsp:
    Code:
    <form:input path="nds" disabled="true"/>
    During form submitting, the value of this field is changed by JavaScript. And here is the problem: Spring thinks that value of disabled fields cannot be changed and it doesn't put that new value into request scope.
    If I set disabled="false" before submitting, the results are right! Another way is to create one more field(hidden) and put the value of the first field to the second one before submitting. But these approaches are not pretty much. Can you tell any better approaches?
    Last edited by ctapobep; Jul 20th, 2009, 06:15 AM.

  • #2
    That has nothing to do with spring... I suggest you pickup a manual/reference about html. There is a difference between disabled and readonly attributes. The main different disabled elements aren't submitted with the request, readonly attributes are.

    Again this has nothing to do with spring it is basic http/html...

    Comment


    • #3
      Aaah... I didn't know, sorry for my silliness!

      Comment

      Working...
      X