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

Form @id and @name are not actually unique

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 2.3.16.3
    • 7.0.0
    • Core Actions
    • None

    Description

      I am placing a form to the same action multiple time each with different hidden attributes:

      <s:form action="myAction">
        <s:hidden name="enabled" value="true"/>
        <s:submit value="Enable" />
      </s:form>
      <s:form action="myAction">
        <s:hidden name="enabled" value="false"/>
        <s:submit value="Disable" />
      </s:form>
      

      Conceptually there should be no problem with this. However, the form's @id and @name attributes are not rendered unique. Struts should use a global counter to append a counter to the names of each attribute automatically. If the user wants to override these attributes explicitly, that should be allowed.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              pbenedict Paul Benedict
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: