I was able to replicate this problem in showcase, I opened a ticket
with your email:

https://issues.apache.org/struts/browse/WW-3029

I am looking into it.
thanks
musachy

On Mon, Mar 9, 2009 at 11:52 AM, Musachy Barroso <musa...@gmail.com> wrote:
> That look like a bug, I will take a look at it.
>
> musachy
>
> On Mon, Mar 9, 2009 at 11:00 AM, phillips1021 <bphill...@ku.edu> wrote:
>>
>> We are moving some applications from using Struts 2.0.11 to Struts 2.1.6.  In
>> our applications using Struts 2.0.11 we used the label tag's key attribute
>> to specify the name, value, label on some of our jsp view pages.  So for
>> example:
>>
>>        <s:label key="personBean.firstName" />
>>
>> would render in the jsp page as:
>>
>> <tr>
>>    <td class="tdLabel"><label for="personBean_firstName" class="label">Your
>> first name:</label></td>
>>    <td
>>><label id="personBean_firstName">Bruce</label></td>
>> </tr>
>>
>> The global-message.properties file has:
>>
>>    personBean.firstName=Your first name
>>
>> and the personBean object exists on the value stack and it has a public
>> getFirstName() method.
>>
>> After changing to Struts 2.1.6, using the label tag with the key attribute
>> no longer works as it did when we used Struts 2.0.11.  Now the jsp renders:
>>
>> <tr>
>>    <td class="tdLabel"><label for="personBean_firstName" class="label">Your
>> first name:</label></td>
>>    <td><label id="personBean_firstName">Your first name</label></td>
>> </tr>
>>
>> Instead of showing the value of the personBean.firstName, it shows the value
>> from the global-message.properties file (Your First Name)
>>
>> If I use <s:property value="personBean.firstName" /> the
>> personBean.firstName value (Bruce) does display correctly on the jsp page.
>>
>> We can change our use of the label tag with key attribute to the property
>> tag, but we are wondering if this is a documented change in how the label
>> tag with key attribute works in 2.1.6 vs 2.0.11 or if this is a bug in
>> 2.1.6.
>>
>> Thanks for the assistance.
>>
>> Bruce Phillips
>> University of Kansas
>>
>>
>>
>> --
>> View this message in context: 
>> http://www.nabble.com/Struts-2.6.1-key-attribute-not-working-as-it-did-in-Struts-2.0.11-tp22413435p22413435.html
>> Sent from the Struts - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>> For additional commands, e-mail: user-h...@struts.apache.org
>>
>>
>
>
>
> --
> "Hey you! Would you help me to carry the stone?" Pink Floyd
>



-- 
"Hey you! Would you help me to carry the stone?" Pink Floyd

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to