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

label tag problems

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • WW 2.0
    • WW 2.1
    • None
    • None

    Description

      ok i've run into a few quirks or bugs with the tag libs..
      ------
      first of all does anyone else think that it makes more sense for the "label" tag to accept a "value" attribute instead of "name" attribute to display data?
      currently I have to use:

      <ww:label label="'TestStringLabel'" name="'testString'" />

      when I was actually expecting to use:

      <ww:label label="'TestStringLabel'" value="'testString'" />

      this is minor.. but still thought i'd bring it up..
      -------
      another that issue with the "label" tag

      now with the "textfield" tag I can do this as expected:
      <ww:textfield label="'TestIntegerTextField'" name="testInteger" value="testInteger + ' with ognl concat'" />
      and the value in the input form comes out to what you'd expect, but with the label tag (using name attribute) it doesnt work the same..

      this displays the value of the testString property when I was actually expecting it to display 'testString' (without quotes)
      <ww:label label="'TestStringLabel'" name="'testString'" />

      and this doesnt display anything for the data! (i was expecting the value of testString property)
      <ww:label label="'TestStringLabel'" name="testString" />

      this displays the value of the testInteger property when I was actually expecting it to display 'testInteger' (without quotes)
      <ww:label label="'Test IntegerLabel'" name="'testInteger'" />

      while this actually works the way I was expecting it to work! (displays the value of testInteger as the data..)
      <ww:label label="'Test IntegerLabel'" name="testInteger" />

      -----------
      and to fix this to work the way I was expecting it to work I added this method to LabelTag, hope im not missing anything obvious here:
      -----------

      protected void evaluateParams(OgnlValueStack stack)

      { super.evaluateParams(stack); addParam("nameValue", findValue(nameAttr, String.class)); }

      Attachments

        Activity

          People

            plightbo@gmail.com Patrick Lightbody
            lagcisco Francisco Hernandez
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: