Announcement Announcement Module
Collapse
No announcement yet.
JSTL Checkbox not reading input Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • JSTL Checkbox not reading input

    Hello!

    My Java bean has the following declaration for the variable milestone

    private boolean milestone;

    In my SQL database this field is declared as type: TINYINT(1), NOT NULL, Default = '0'.

    My hibernate map contains:

    <property name="milestone" type="boolean">
    <column name="milestone" not-null="true" />
    </property>

    I have the following code in my jsp

    <tr>
    <td> Milestone </td>
    <td><spring:bind path="command.milestone">
    <input type="checkbox" name='<c:out value="${status.expression}"/>'
    <c:if test="${status.value}">checked</c:if>
    value='<c:out value="${status.value}"/>' onBlur="validate()">
    </spring:bind>
    </td>
    </tr>

    The jsp correctly displays the value stored in the database, however when I change the value in the jsp checkbox and Save the form, the change doesn't reflect in the database.

    Can you please help me. Thanks in advance,
Working...
X