Struts 2
  1. Struts 2
  2. WW-2069

Drop "id" and "name" attributes" on the tags where they are deprecated.

    Details

    • Type: Task Task
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: 3.0
    • Component/s: Plugin - Tags
    • Labels:
      None

      Description

      This is a follow up of WW-2027

        Issue Links

          Activity

          Hide
          Lukasz Lenart added a comment -

          What is the issue here?

          Show
          Lukasz Lenart added a comment - What is the issue here?
          Hide
          Brett added a comment - - edited

          From WW-1888, several tags, including the form tag, generate invalid xhtml by including the name attribute. One of the comments on the issue says it would cause problems if it was removed outright, but can you provide an additional tag attribute or some way to configure the tag to not include the name attribute in the rendered html?

          I'm basically hacking around it now, if I do something like:
          <s:form id="form1" action="/myNamespace/myAction.action" method="post">

          it won't render the invalid name attribute on the form but I do end up with an additional warning message in the log which is considerably less than desirable.

          20003 [http-8080-1] WARN org.apache.struts2.components.ServletUrlRenderer - No configuration found for the specified action: '/myNamespace/myAction.action in namespace: '/myNamespace'. Form action defaulting to 'action' attribute's literal value.

          Show
          Brett added a comment - - edited From WW-1888 , several tags, including the form tag, generate invalid xhtml by including the name attribute. One of the comments on the issue says it would cause problems if it was removed outright, but can you provide an additional tag attribute or some way to configure the tag to not include the name attribute in the rendered html? I'm basically hacking around it now, if I do something like: <s:form id="form1" action="/myNamespace/myAction.action" method="post"> it won't render the invalid name attribute on the form but I do end up with an additional warning message in the log which is considerably less than desirable. 20003 [http-8080-1] WARN org.apache.struts2.components.ServletUrlRenderer - No configuration found for the specified action: '/myNamespace/myAction.action in namespace: '/myNamespace'. Form action defaulting to 'action' attribute's literal value.
          Hide
          Lukasz Lenart added a comment -

          Thanks Brett for explanation!

          Show
          Lukasz Lenart added a comment - Thanks Brett for explanation!

            People

            • Assignee:
              Unassigned
              Reporter:
              musachy
            • Votes:
              3 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:

                Development