History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: WW-484
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Patrick Lightbody
Reporter: Francisco Hernandez
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
WebWork

label tag problems

Created: 26/Feb/04 03:14 AM   Updated: 16/Mar/04 07:18 PM
Component/s: None
Affects Version/s: 2.0
Fix Version/s: 2.1


 Description  « Hide
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));
  }

 All   Comments   Change History      Sort Order:
There are no comments yet on this issue.