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

ww:text tag returns an invalid value for an i18n key that starts with the same name as an action variable

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • WW 2.2.1
    • WW 2.2.2
    • None
    • None
    • Webwork 2.2.1, JDK 1.4.2, Freemarker view

    Description

      Create a simple action TestAction with a field variable foo and a getter/setter for the foo variable. (getFoo(), setFoo()). In an i18n file, create two keys, foo.bar.baz and bar.baz. In your action resule, use the <ww:text> tag to retreive an i18n key 'foo.bar.baz'. The value that gets returned is the value of the key 'bar.baz' not the key 'foo.bar.baz'.

      This happens only when there is a getter method for a field variable with the same name as the start of the i18n key. If you rename the field variable or the start of the i18n key, everything works as expected.

      Attachments

        Activity

          People

            rainerh Rainer Hermanns
            niko2416 Nick Hill
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: