[ 
https://issues.apache.org/struts/browse/WW-3144?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=46631#action_46631
 ] 

Musachy Barroso commented on WW-3144:
-------------------------------------

I added this to LabelTest (test fails..i just wanted to see the output):

public void testWithJustKeyValueFromStack() throws Exception {
        TestAction testAction = (TestAction) action;
        final String key = "labelKey";
        final String value = "baz";
        testAction.setText(key, value);

        LabelTag tag = new LabelTag();
        tag.setTheme("simple");
        tag.setPageContext(pageContext);
        tag.setKey(key);

        tag.doStartTag();
        tag.doEndTag();

        verify(LabelTest.class.getResource("Label-4.txt"));
    }

and the output was:

<label id="labelKey">baz</label>

> Label tag doesn't use "key" attribute properly
> ----------------------------------------------
>
>                 Key: WW-3144
>                 URL: https://issues.apache.org/struts/browse/WW-3144
>             Project: Struts 2
>          Issue Type: Bug
>    Affects Versions: 2.1.6
>            Reporter: Dave Newton
>            Priority: Minor
>             Fix For: 2.1.8
>
>
> <s:label name="foo"/> works
> <s:label name="foo" label="%{getText('foo')}"/> works
> <s:label key="foo"/> puts the foo msg into the not-label label.
> Positively labelous.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to