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

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

    Details

    • Type: Task
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.5
    • Component/s: Plugin - Tags
    • Labels:
      None

      Description

      This is a follow up of WW-2027

        Issue Links

          Activity

          Hide
          hudson Hudson added a comment -

          SUCCESS: Integrated in Struts-JDK7-master #495 (See https://builds.apache.org/job/Struts-JDK7-master/495/)
          WW-2069 Replaces 'id' and 'name' with 'var'. (lukaszlenart: rev aff7a560456ee776a9db9000fff8f49b12895cca)

          • apps/showcase/src/main/webapp/WEB-INF/person/new-person.ftl
          • archetypes/struts2-archetype-dbportlet/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/view/index.jsp
          • archetypes/struts2-archetype-convention/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/content/hello.jsp
          • apps/showcase/src/main/webapp/WEB-INF/tags/non-ui/iteratorTag/appendIteratorTagDemoResult.jsp
          • archetypes/struts2-archetype-blank/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/example/HelloWorld.jsp
          • apps/showcase/src/main/webapp/WEB-INF/empmanager/editSkill.jsp
          • apps/showcase/src/main/webapp/WEB-INF/hangman/hangmanNonAjax.ftl
          • plugins/config-browser/src/main/resources/config-browser/showConfig.ftl
          • apps/showcase/src/main/webapp/WEB-INF/tags/non-ui/actionPrefix/actionPrefixExample.ftl
          • apps/showcase/src/main/webapp/WEB-INF/hangman/updateCharacterAvailable.ftl
          • apps/showcase/src/main/webapp/WEB-INF/hangman/updateGuessLeft.ftl
          • apps/portlet/src/main/webapp/WEB-INF/view/helloWorld.vm
          • apps/showcase/src/main/webapp/WEB-INF/person/edit-person.jsp
          • plugins/config-browser/src/main/resources/config-browser/tigris-macros.ftl
          • apps/portlet/src/main/webapp/tiles/footer.jsp
          • plugins/config-browser/src/main/resources/config-browser/page-header.ftl
          • apps/portlet/src/main/webapp/tiles/footer.ftl
          • plugins/config-browser/src/main/resources/config-browser/actionNames.ftl
          • apps/showcase/src/main/webapp/WEB-INF/hangman/updateScaffold.ftl
          • apps/showcase/src/main/webapp/WEB-INF/hangman/updateVocabCharacters.ftl
          • apps/showcase/src/main/webapp/WEB-INF/person/list-people.ftl
          • apps/portlet/src/main/webapp/tiles/index.jsp
          Show
          hudson Hudson added a comment - SUCCESS: Integrated in Struts-JDK7-master #495 (See https://builds.apache.org/job/Struts-JDK7-master/495/ ) WW-2069 Replaces 'id' and 'name' with 'var'. (lukaszlenart: rev aff7a560456ee776a9db9000fff8f49b12895cca) apps/showcase/src/main/webapp/WEB-INF/person/new-person.ftl archetypes/struts2-archetype-dbportlet/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/view/index.jsp archetypes/struts2-archetype-convention/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/content/hello.jsp apps/showcase/src/main/webapp/WEB-INF/tags/non-ui/iteratorTag/appendIteratorTagDemoResult.jsp archetypes/struts2-archetype-blank/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/example/HelloWorld.jsp apps/showcase/src/main/webapp/WEB-INF/empmanager/editSkill.jsp apps/showcase/src/main/webapp/WEB-INF/hangman/hangmanNonAjax.ftl plugins/config-browser/src/main/resources/config-browser/showConfig.ftl apps/showcase/src/main/webapp/WEB-INF/tags/non-ui/actionPrefix/actionPrefixExample.ftl apps/showcase/src/main/webapp/WEB-INF/hangman/updateCharacterAvailable.ftl apps/showcase/src/main/webapp/WEB-INF/hangman/updateGuessLeft.ftl apps/portlet/src/main/webapp/WEB-INF/view/helloWorld.vm apps/showcase/src/main/webapp/WEB-INF/person/edit-person.jsp plugins/config-browser/src/main/resources/config-browser/tigris-macros.ftl apps/portlet/src/main/webapp/tiles/footer.jsp plugins/config-browser/src/main/resources/config-browser/page-header.ftl apps/portlet/src/main/webapp/tiles/footer.ftl plugins/config-browser/src/main/resources/config-browser/actionNames.ftl apps/showcase/src/main/webapp/WEB-INF/hangman/updateScaffold.ftl apps/showcase/src/main/webapp/WEB-INF/hangman/updateVocabCharacters.ftl apps/showcase/src/main/webapp/WEB-INF/person/list-people.ftl apps/portlet/src/main/webapp/tiles/index.jsp
          Hide
          lukaszlenart Lukasz Lenart added a comment -

          Yes, looks good! Nice work, thanks a lot!

          Show
          lukaszlenart Lukasz Lenart added a comment - Yes, looks good! Nice work, thanks a lot!
          Hide
          hudson Hudson added a comment -

          SUCCESS: Integrated in Struts-JDK7-master #388 (See https://builds.apache.org/job/Struts-JDK7-master/388/)
          WW-2069 Replaces 'id' and 'name' with 'var'. (amashchenko: rev 705915abd22d1100a89497663bf0ba0fb81fd2f6)

          • apps/showcase/src/main/webapp/WEB-INF/empmanager/editSkill.jsp
          • apps/showcase/src/main/webapp/WEB-INF/hangman/updateScaffold.ftl
          • plugins/config-browser/src/main/resources/config-browser/tigris-macros.ftl
          • plugins/config-browser/src/main/resources/config-browser/page-header.ftl
          • apps/portlet/src/main/webapp/tiles/footer.jsp
          • archetypes/struts2-archetype-convention/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/content/hello.jsp
          • apps/portlet/src/main/webapp/tiles/footer.ftl
          • plugins/config-browser/src/main/resources/config-browser/actionNames.ftl
          • apps/portlet/src/main/webapp/tiles/index.jsp
          • apps/showcase/src/main/webapp/WEB-INF/person/edit-person.jsp
          • apps/portlet/src/main/webapp/WEB-INF/view/helloWorld.vm
          • archetypes/struts2-archetype-blank/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/example/HelloWorld.jsp
          • apps/showcase/src/main/webapp/WEB-INF/hangman/updateVocabCharacters.ftl
          • apps/showcase/src/main/webapp/WEB-INF/hangman/updateCharacterAvailable.ftl
          • archetypes/struts2-archetype-dbportlet/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/view/index.jsp
          • apps/showcase/src/main/webapp/WEB-INF/hangman/hangmanNonAjax.ftl
          • apps/showcase/src/main/webapp/WEB-INF/tags/non-ui/iteratorTag/appendIteratorTagDemoResult.jsp
          • apps/showcase/src/main/webapp/WEB-INF/person/new-person.ftl
          • apps/showcase/src/main/webapp/WEB-INF/person/list-people.ftl
          • apps/showcase/src/main/webapp/WEB-INF/tags/non-ui/actionPrefix/actionPrefixExample.ftl
          • apps/showcase/src/main/webapp/WEB-INF/hangman/updateGuessLeft.ftl
          • plugins/config-browser/src/main/resources/config-browser/showConfig.ftl
          Show
          hudson Hudson added a comment - SUCCESS: Integrated in Struts-JDK7-master #388 (See https://builds.apache.org/job/Struts-JDK7-master/388/ ) WW-2069 Replaces 'id' and 'name' with 'var'. (amashchenko: rev 705915abd22d1100a89497663bf0ba0fb81fd2f6) apps/showcase/src/main/webapp/WEB-INF/empmanager/editSkill.jsp apps/showcase/src/main/webapp/WEB-INF/hangman/updateScaffold.ftl plugins/config-browser/src/main/resources/config-browser/tigris-macros.ftl plugins/config-browser/src/main/resources/config-browser/page-header.ftl apps/portlet/src/main/webapp/tiles/footer.jsp archetypes/struts2-archetype-convention/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/content/hello.jsp apps/portlet/src/main/webapp/tiles/footer.ftl plugins/config-browser/src/main/resources/config-browser/actionNames.ftl apps/portlet/src/main/webapp/tiles/index.jsp apps/showcase/src/main/webapp/WEB-INF/person/edit-person.jsp apps/portlet/src/main/webapp/WEB-INF/view/helloWorld.vm archetypes/struts2-archetype-blank/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/example/HelloWorld.jsp apps/showcase/src/main/webapp/WEB-INF/hangman/updateVocabCharacters.ftl apps/showcase/src/main/webapp/WEB-INF/hangman/updateCharacterAvailable.ftl archetypes/struts2-archetype-dbportlet/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/view/index.jsp apps/showcase/src/main/webapp/WEB-INF/hangman/hangmanNonAjax.ftl apps/showcase/src/main/webapp/WEB-INF/tags/non-ui/iteratorTag/appendIteratorTagDemoResult.jsp apps/showcase/src/main/webapp/WEB-INF/person/new-person.ftl apps/showcase/src/main/webapp/WEB-INF/person/list-people.ftl apps/showcase/src/main/webapp/WEB-INF/tags/non-ui/actionPrefix/actionPrefixExample.ftl apps/showcase/src/main/webapp/WEB-INF/hangman/updateGuessLeft.ftl plugins/config-browser/src/main/resources/config-browser/showConfig.ftl
          Hide
          aleksandr-m Aleksandr Mashchenko added a comment -

          Lukasz Lenart Can you confirm that examples and config-browser plugin are working now?

          Show
          aleksandr-m Aleksandr Mashchenko added a comment - Lukasz Lenart Can you confirm that examples and config-browser plugin are working now?
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 705915abd22d1100a89497663bf0ba0fb81fd2f6 in struts's branch refs/heads/master from Aleksandr Mashchenko
          [ https://git-wip-us.apache.org/repos/asf?p=struts.git;h=705915a ]

          WW-2069 Replaces 'id' and 'name' with 'var'.

          Show
          jira-bot ASF subversion and git services added a comment - Commit 705915abd22d1100a89497663bf0ba0fb81fd2f6 in struts's branch refs/heads/master from Aleksandr Mashchenko [ https://git-wip-us.apache.org/repos/asf?p=struts.git;h=705915a ] WW-2069 Replaces 'id' and 'name' with 'var'.
          Hide
          lukaszlenart Lukasz Lenart added a comment -

          Re-openning as all the examples are broken now and also config-browser plugin

          Show
          lukaszlenart Lukasz Lenart added a comment - Re-openning as all the examples are broken now and also config-browser plugin
          Hide
          hudson Hudson added a comment -

          SUCCESS: Integrated in Struts-JDK7-master #382 (See https://builds.apache.org/job/Struts-JDK7-master/382/)
          WW-2069 Drops "id" and "name" attributes" on the tags where they are (amashchenko: rev f8718f9187028c20bf1c042a6a7bfaaadd4ec8b8)

          • core/src/test/java/org/apache/struts2/views/jsp/SortIteratorTagTest.java
          • core/src/main/java/org/apache/struts2/views/jsp/iterator/SubsetIteratorTag.java
          • core/src/site/resources/tags/url.html
          • core/src/site/resources/tags/generator.html
          • core/src/test/java/org/apache/struts2/views/jsp/AppendIteratorTagTest.java
          • core/src/test/java/org/apache/struts2/views/jsp/TextTagTest.java
          • core/src/site/resources/tags/date.html
          • core/src/test/java/org/apache/struts2/views/jsp/ActionTagTest.java
          • core/src/site/resources/tags/iterator.html
          • core/src/test/java/org/apache/struts2/views/jsp/IteratorTagTest.java
          • core/src/test/java/org/apache/struts2/views/jsp/ui/DateTagTest.java
          • core/src/test/java/org/apache/struts2/views/jsp/MergeIteratorTagTest.java
          • core/src/site/resources/tags/bean.html
          • core/src/site/resources/tags/merge.html
          • core/src/site/resources/tags/number.html
          • core/src/site/resources/tags/subset.html
          • core/src/site/resources/tags/action.html
          • core/src/main/java/org/apache/struts2/components/AppendIterator.java
          • core/src/test/java/org/apache/struts2/views/jsp/IteratorGeneratorTagTest.java
          • core/src/site/resources/tags/append.html
          • core/src/site/resources/tags/set.html
          • core/src/test/java/org/apache/struts2/views/jsp/URLTagTest.java
          • core/src/site/resources/tags/text.html
          • core/src/main/java/org/apache/struts2/components/MergeIterator.java
          • core/src/main/java/org/apache/struts2/components/ContextBean.java
          • core/src/test/java/org/apache/struts2/views/jsp/SubsetIteratorTagTest.java
          • core/src/main/java/org/apache/struts2/components/Set.java
          • core/src/site/resources/tags/sort.html
          • core/src/main/java/org/apache/struts2/views/jsp/iterator/IteratorGeneratorTag.java
          • core/src/main/java/org/apache/struts2/views/jsp/iterator/SortIteratorTag.java
          • core/src/main/java/org/apache/struts2/views/jsp/ContextBeanTag.java
          Show
          hudson Hudson added a comment - SUCCESS: Integrated in Struts-JDK7-master #382 (See https://builds.apache.org/job/Struts-JDK7-master/382/ ) WW-2069 Drops "id" and "name" attributes" on the tags where they are (amashchenko: rev f8718f9187028c20bf1c042a6a7bfaaadd4ec8b8) core/src/test/java/org/apache/struts2/views/jsp/SortIteratorTagTest.java core/src/main/java/org/apache/struts2/views/jsp/iterator/SubsetIteratorTag.java core/src/site/resources/tags/url.html core/src/site/resources/tags/generator.html core/src/test/java/org/apache/struts2/views/jsp/AppendIteratorTagTest.java core/src/test/java/org/apache/struts2/views/jsp/TextTagTest.java core/src/site/resources/tags/date.html core/src/test/java/org/apache/struts2/views/jsp/ActionTagTest.java core/src/site/resources/tags/iterator.html core/src/test/java/org/apache/struts2/views/jsp/IteratorTagTest.java core/src/test/java/org/apache/struts2/views/jsp/ui/DateTagTest.java core/src/test/java/org/apache/struts2/views/jsp/MergeIteratorTagTest.java core/src/site/resources/tags/bean.html core/src/site/resources/tags/merge.html core/src/site/resources/tags/number.html core/src/site/resources/tags/subset.html core/src/site/resources/tags/action.html core/src/main/java/org/apache/struts2/components/AppendIterator.java core/src/test/java/org/apache/struts2/views/jsp/IteratorGeneratorTagTest.java core/src/site/resources/tags/append.html core/src/site/resources/tags/set.html core/src/test/java/org/apache/struts2/views/jsp/URLTagTest.java core/src/site/resources/tags/text.html core/src/main/java/org/apache/struts2/components/MergeIterator.java core/src/main/java/org/apache/struts2/components/ContextBean.java core/src/test/java/org/apache/struts2/views/jsp/SubsetIteratorTagTest.java core/src/main/java/org/apache/struts2/components/Set.java core/src/site/resources/tags/sort.html core/src/main/java/org/apache/struts2/views/jsp/iterator/IteratorGeneratorTag.java core/src/main/java/org/apache/struts2/views/jsp/iterator/SortIteratorTag.java core/src/main/java/org/apache/struts2/views/jsp/ContextBeanTag.java
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit f8718f9187028c20bf1c042a6a7bfaaadd4ec8b8 in struts's branch refs/heads/master from Aleksandr Mashchenko
          [ https://git-wip-us.apache.org/repos/asf?p=struts.git;h=f8718f9 ]

          WW-2069 Drops "id" and "name" attributes" on the tags where they are deprecated.

          Show
          jira-bot ASF subversion and git services added a comment - Commit f8718f9187028c20bf1c042a6a7bfaaadd4ec8b8 in struts's branch refs/heads/master from Aleksandr Mashchenko [ https://git-wip-us.apache.org/repos/asf?p=struts.git;h=f8718f9 ] WW-2069 Drops "id" and "name" attributes" on the tags where they are deprecated.
          Hide
          lukaszlenart Lukasz Lenart added a comment -

          Aleksandr Mashchenko no reason at all

          Show
          lukaszlenart Lukasz Lenart added a comment - Aleksandr Mashchenko no reason at all
          Hide
          aleksandr-m Aleksandr Mashchenko added a comment -

          Lukasz Lenart IMO this is not related to WW-1888. This is about id -> var transition, see WW-2027.

          Any reason why we can't do this in 2.5? Seems working fine on my machine after dropping setId and fixing tests.

          Show
          aleksandr-m Aleksandr Mashchenko added a comment - Lukasz Lenart IMO this is not related to WW-1888 . This is about id -> var transition, see WW-2027 . Any reason why we can't do this in 2.5? Seems working fine on my machine after dropping setId and fixing tests.
          Hide
          lukaszlenart Lukasz Lenart added a comment -

          Thanks Brett for explanation!

          Show
          lukaszlenart Lukasz Lenart added a comment - Thanks Brett for explanation!
          Hide
          bgraves 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
          bgraves 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
          lukaszlenart Lukasz Lenart added a comment -

          What is the issue here?

          Show
          lukaszlenart Lukasz Lenart added a comment - What is the issue here?

            People

            • Assignee:
              aleksandr-m Aleksandr Mashchenko
              Reporter:
              musachy musachy
            • Votes:
              3 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development