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

XHTML validations for s:hidden in form

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.3.15.3
    • Fix Version/s: 2.3.20
    • Component/s: Core Actions
    • Labels:
    • Environment:

      Plattform independent

      Description

      Hello!

      I first posted this in user user@struts.apache.org, please see:
      https://mail-archives.apache.org/mod_mbox/struts-user/201403.mbox/%3CDUB129-W3328CF1DD22C328A3F2480B1880@phx.gbl%3E

      It looks like this might be a bug since the form do not pass validation at:
      http://validator.w3.org/check

      The problem is that hidden tags in the form is within the table, but do not get any tr and td tags.

      The struts-users helped me to this work around:

      I put a new file "hidden.ftl" in my resources-folder (I use maven with eclipse):
      resources/template/xhtml/hidden.ftl

      The content in hidden.ftl is:

      <tr style="display:none;">
      	<td>
      		<#include "/${parameters.templateDir}/simple/hidden.ftl" />
      	</td>
      </tr>
      

      Then it validates fine!

      Best regards
      Fredrik
      .

        Issue Links

          Activity

          Hide
          hudson Hudson added a comment -

          SUCCESS: Integrated in Struts-JDK7-master #371 (See https://builds.apache.org/job/Struts-JDK7-master/371/)
          WW-4447 Reverts some changes introduced by WW-4297 Resetting 'label' (lukaszlenart: rev 243378937969e5caeeeefc2bd98ce799a995e431)

          • core/src/main/java/org/apache/struts2/components/Hidden.java
          Show
          hudson Hudson added a comment - SUCCESS: Integrated in Struts-JDK7-master #371 (See https://builds.apache.org/job/Struts-JDK7-master/371/ ) WW-4447 Reverts some changes introduced by WW-4297 Resetting 'label' (lukaszlenart: rev 243378937969e5caeeeefc2bd98ce799a995e431) core/src/main/java/org/apache/struts2/components/Hidden.java
          Hide
          hudson Hudson added a comment -

          SUCCESS: Integrated in Struts-JDK6-master #904 (See https://builds.apache.org/job/Struts-JDK6-master/904/)
          WW-4447 Reverts some changes introduced by WW-4297 (lukaszlenart: rev 243378937969e5caeeeefc2bd98ce799a995e431)

          • core/src/main/java/org/apache/struts2/components/Hidden.java
          Show
          hudson Hudson added a comment - SUCCESS: Integrated in Struts-JDK6-master #904 (See https://builds.apache.org/job/Struts-JDK6-master/904/ ) WW-4447 Reverts some changes introduced by WW-4297 (lukaszlenart: rev 243378937969e5caeeeefc2bd98ce799a995e431) core/src/main/java/org/apache/struts2/components/Hidden.java
          Hide
          hudson Hudson added a comment -

          SUCCESS: Integrated in Struts-JDK6-develop #123 (See https://builds.apache.org/job/Struts-JDK6-develop/123/)
          WW-4447 Reverts some changes introduced by WW-4297 (lukaszlenart: rev 243378937969e5caeeeefc2bd98ce799a995e431)

          • core/src/main/java/org/apache/struts2/components/Hidden.java
          Show
          hudson Hudson added a comment - SUCCESS: Integrated in Struts-JDK6-develop #123 (See https://builds.apache.org/job/Struts-JDK6-develop/123/ ) WW-4447 Reverts some changes introduced by WW-4297 (lukaszlenart: rev 243378937969e5caeeeefc2bd98ce799a995e431) core/src/main/java/org/apache/struts2/components/Hidden.java
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 243378937969e5caeeeefc2bd98ce799a995e431 in struts's branch refs/heads/develop from Lukasz Lenart
          [ https://git-wip-us.apache.org/repos/asf?p=struts.git;h=2433789 ]

          WW-4447 Reverts some changes introduced by WW-4297
          Resetting 'label' attribute can block user if they would like to
          develop their own hidden.ftl template

          Show
          jira-bot ASF subversion and git services added a comment - Commit 243378937969e5caeeeefc2bd98ce799a995e431 in struts's branch refs/heads/develop from Lukasz Lenart [ https://git-wip-us.apache.org/repos/asf?p=struts.git;h=2433789 ] WW-4447 Reverts some changes introduced by WW-4297 Resetting 'label' attribute can block user if they would like to develop their own hidden.ftl template
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit d63deb9750a3d409be30414faaf76f5481a4417d in struts's branch refs/heads/feature/WW-4187-correctly-identify-protocols from Lukasz Lenart
          [ https://git-wip-us.apache.org/repos/asf?p=struts.git;h=d63deb9 ]

          WW-4297 finishes feature: improves hidden tag to properly support xhtml theme

          Show
          jira-bot ASF subversion and git services added a comment - Commit d63deb9750a3d409be30414faaf76f5481a4417d in struts's branch refs/heads/feature/ WW-4187 -correctly-identify-protocols from Lukasz Lenart [ https://git-wip-us.apache.org/repos/asf?p=struts.git;h=d63deb9 ] WW-4297 finishes feature: improves hidden tag to properly support xhtml theme
          Hide
          lukaszlenart Lukasz Lenart added a comment -

          Thanks Paul Benedict! Reverted to original solution.

          Show
          lukaszlenart Lukasz Lenart added a comment - Thanks Paul Benedict ! Reverted to original solution.
          Hide
          lukaszlenart Lukasz Lenart added a comment -

          D... you're right :/

          Show
          lukaszlenart Lukasz Lenart added a comment - D... you're right :/
          Hide
          pbenedict pbenedict added a comment -

          The commit doesn't hide the row using CSS like the reporter recommended. Oversight or intended?

          Show
          pbenedict pbenedict added a comment - The commit doesn't hide the row using CSS like the reporter recommended. Oversight or intended?
          Hide
          lukaszlenart Lukasz Lenart added a comment -

          Done, patch applied! Thanks!

          Show
          lukaszlenart Lukasz Lenart added a comment - Done, patch applied! Thanks!
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit d63deb9750a3d409be30414faaf76f5481a4417d in struts's branch refs/heads/develop from Lukasz Lenart
          [ https://git-wip-us.apache.org/repos/asf?p=struts.git;h=d63deb9 ]

          WW-4297 finishes feature: improves hidden tag to properly support xhtml theme

          Show
          jira-bot ASF subversion and git services added a comment - Commit d63deb9750a3d409be30414faaf76f5481a4417d in struts's branch refs/heads/develop from Lukasz Lenart [ https://git-wip-us.apache.org/repos/asf?p=struts.git;h=d63deb9 ] WW-4297 finishes feature: improves hidden tag to properly support xhtml theme

            People

            • Assignee:
              lukaszlenart Lukasz Lenart
              Reporter:
              fredand44 Fredrik Andersson
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 2h
                2h
                Remaining:
                Remaining Estimate - 2h
                2h
                Logged:
                Time Spent - Not Specified
                Not Specified

                  Development