Uploaded image for project: 'Struts 1'
  1. Struts 1
  2. STR-2278

warn if Boolean or String[] or FormFile are not reset() i.e. checkbox and multibox tag

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Won't Fix
    • 1.2.4
    • None
    • Unknown
    • None
    • Operating System: other
      Platform: Other
    • 32176

    Description

      As per STR-2217 when migrating to 1.2.4, I set the scope to "session" as the
      path of least resistance to gain backward compatibility.

      Unfortunately, this seems to "ask for trouble" when having <html:checkbox on the
      form:

      1) if the form is for example a user profile that a user might update many times
      to get familiar with the options, after checking the box, it will not be
      possible to uncheck it anymore. Unchecking appears only to be possible if the
      user does so when encountering the form for the first time (i.e. it is not yet
      in the session ==> pre-filling the form happens from some other bean in the session)
      2) if the checkboxes are built from a list with logic:iterate and a user uses
      the browser back-button (before an Action.execute() had a chance to clean that
      form bean from the session), it may even happen that in the session there are
      checkbox values visible to Action.execute() that were not visible in the jsp
      page because the list had changed in the meantime.

      Therefore my suggestion is to remove the scope attribute and default its value
      to "request".

      Attachments

        Activity

          People

            Unassigned Unassigned
            hauser@acm.org Ralf Hauser
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: