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

  • JSTL Checkbox not reading input


    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" />

    I have the following code in my jsp

    <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()">

    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,