Uploaded image for project: 'Struts 2'
  1. Struts 2
  2. WW-4886

Checkbox is taking value as true on deselecting

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 2.5.12
    • Fix Version/s: None
    • Component/s: Other
    • Labels:
    • Environment:

      JDK 1.8, Jboss-eap-7.0.0

      Description

      I am migrating struts 2.3 to 2.5.12 after migration checkbox validation is not working , It is taking the value as true if we are not checked the box as well.
      Actual code

      <s:checkbox id="customer.quote.application.example1" name="customer.quote.application.example1"  theme="simple"/>
      

      internally the code will be generated like..

      <input type="checkbox" name="customer.quote.application.example1" value="true" checked="checked" id="customer.quote.application.example1">
      <input type="hidden" id="__checkbox_customer.quote.application.example1" name="__checkbox_customer.quote.application.example1" value="true">
      

      Can you please suggest any option for this?

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              MOORYAN Nivedya
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: