Struts 2
  1. Struts 2
  2. WW-2171

Label tag does not use key attribute to lookup value in resources when using simple theme

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0.9
    • Fix Version/s: 2.1.1
    • Component/s: Plugin - Tags
    • Labels:
      None
    • Flags:
      Patch

      Description

      When using the simple theme (setting property "struts.ui.theme" to "simple"), the struts label tag does not use the key attribute to look up label value in resources.
      It does when using the css_xhtml theme.

      Example jsp fragment:

      <s:label key="company.name"/>

      Resource file fragment:

      company.name=Company name

      Html produced by css_xhtml theme (minus some space and divs):

      <label class="label" for="xxxxx_company_name">Company name:</label>

      (I am not sure where the "for" attribute comes from. I suspect that the html label tag is produced
      by css_xhtml/controlheader-core.ftl).

      Html produced by simple theme:

      <label id="xxxxx_company_name"/>

      Html that I expected simple theme to produce:

      <label id="xxxxx_company_name">Company name</label>

      1. label-patch.txt
        3 kB
        Maja S Bratseth

        Issue Links

          Activity

          Maja S Bratseth created issue -
          Maja S Bratseth made changes -
          Field Original Value New Value
          Attachment label-patch.txt [ 13609 ]
          Maja S Bratseth made changes -
          Flags [Patch]
          James Holmes made changes -
          Fix Version/s 2.0.11 [ 21860 ]
          James Holmes made changes -
          Fix Version/s 2.0.12 [ 21861 ]
          Fix Version/s 2.0.11 [ 21860 ]
          Ted Husted made changes -
          Fix Version/s 2.1.2 [ 21861 ]
          Fix Version/s 2.1.1 [ 21863 ]
          Ted Husted made changes -
          Assignee Ted Husted [ husted ]
          Ted Husted made changes -
          Resolution Fixed [ 1 ]
          Status Open [ 1 ] Resolved [ 5 ]
          Antonio Petrelli made changes -
          Workflow Struts - editable closed status [ 44477 ] Struts - editable closed status (temporary) [ 48801 ]
          Antonio Petrelli made changes -
          Workflow Struts - editable closed status (temporary) [ 48801 ] Struts - editable closed status [ 51941 ]
          Jeff Turner made changes -
          Project Import Mon Feb 01 01:17:42 UTC 2010 [ 1264987062082 ]
          Andy Chapman made changes -
          Link This issue is blocked by WW-3459 [ WW-3459 ]
          Andy Chapman made changes -
          Link This issue is blocked by WW-3459 [ WW-3459 ]
          Andy Chapman made changes -
          Link This issue is related to WW-3459 [ WW-3459 ]
          Lukasz Lenart made changes -
          Status Resolved [ 5 ] Closed [ 6 ]

            People

            • Assignee:
              Ted Husted
              Reporter:
              Maja S Bratseth
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development