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

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.0.9
    • 2.1.1
    • Plugin - Tags
    • None
    • 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>

      Attachments

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

        Issue Links

          Activity

            People

              husted Ted Husted
              majasb Maja S Bratseth
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: