struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Musachy Barroso (JIRA)" <j...@apache.org>
Subject [jira] Created: (WW-3029) key attribute is not working properly
Date Mon, 09 Mar 2009 17:34:04 GMT
key attribute is not working properly
-------------------------------------

                 Key: WW-3029
                 URL: https://issues.apache.org/struts/browse/WW-3029
             Project: Struts 2
          Issue Type: Bug
    Affects Versions: 2.1.6
            Reporter: Musachy Barroso
            Priority: Critical
             Fix For: 2.1.7


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.

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


Mime
View raw message