in your 2.0.11 test where did you populate personBean.firstName with 'Bruce' ? Martin ______________________________________________ Disclaimer and confidentiality note Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission.
> Date: Mon, 9 Mar 2009 08:00:52 -0700 > From: bphill...@ku.edu > To: user@struts.apache.org > Subject: Struts 2.6.1 key attribute not working as it did in Struts 2.0.11 > > > 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 > _________________________________________________________________ Windows Liveā¢: Life without walls. http://windowslive.com/explore?ocid=TXT_TAGLM_WL_allup_1a_explore_032009