The following comment has been added to this issue:
Author: fabrizio giustina
Created: Wed, 20 Oct 2004 10:31 AM
Body:
Could you please try with this modified code (with an alternated sort attribute)? It
will be useful to understand if it can be a tag pooling problem, thanks
<display:table name="${employees}" id="employee" pagesize="40" requestURI="">
<display:column property="firstName" titleKey="employee.firstname" sort="true"/>
<display:column property="lastName" titleKey="employee.lastname" />
<display:column property="mobileNumber" titleKey="employee.mobile" sort="true"/>
<display:column property="landlineNumber" titleKey="employee.landline"/>
<display:column property="faxNumber" titleKey="employee.fax" sort="true"/>
<display:column property="emailAddress" titleKey="employee.email"/>
<display:column title="" sort="true"><a
href="employee_edit.do?id=${employee.id}"><fmt:message
key="employee.list.edit"/></a></display:column>
</display:table>
---------------------------------------------------------------------
View this comment:
http://jira.codehaus.org/browse/DISPL-72?page=comments#action_25619
---------------------------------------------------------------------
View the issue:
http://jira.codehaus.org/browse/DISPL-72
Here is an overview of the issue:
---------------------------------------------------------------------
Key: DISPL-72
Summary: titleKey reads incorrect values from properties
Type: Bug
Status: Unassigned
Priority: Major
Original Estimate: Unknown
Time Spent: Unknown
Remaining: Unknown
Project: DisplayTag
Components:
I18N
Versions:
1.0 RC2
Assignee:
Reporter: Mass Dosage
Created: Wed, 20 Oct 2004 7:00 AM
Updated: Wed, 20 Oct 2004 10:31 AM
Description:
Using the latest dev snapshot from today I have been trying to use the new titleKey
column attribute to do i18n. I have JSP like so:
<display:table name="${employees}" id="employee" pagesize="40" requestURI="">
<display:column property="firstName" titleKey="employee.firstname" sort="true"/>
<display:column property="lastName" titleKey="employee.lastname" sort="true"/>
<display:column property="mobileNumber" titleKey="employee.mobile"/>
<display:column property="landlineNumber" titleKey="employee.landline"/>
<display:column property="faxNumber" titleKey="employee.fax"/>
<display:column property="emailAddress" titleKey="employee.email"/>
<display:column title=""><a href="employee_edit.do?id=${employee.id}"><fmt:message
key="employee.list.edit"/></a></display:column>
</display:table>
This iterates through all employees in the list and outputs their properties. The
table headers should all have values looked up from the properties specified by the
"titleKey" attributes.
Fine. I have a "messages.properties" file on my classpath and spring is configured to
pick this up, it gets them correctly if I use "fmt:message" tags, so I know the
reading in of the properties is working. The messages are like so:
employee.firstname=First Name
employee.mobile=Mobile Number
employee.lastname=Last Name
employee.landline=Landline Number
employee.fax=Fax
employee.email=E-mail
so they match the values used for "titleKey". All good so far. However, when I open
the JSP page in the browser I get very strange results for the table headers:
<thead><tr>
<th class="sortable">
<a href="?d-4001840-s=0&d-4001840-o=2">First Name</a></th>
<th class="sortable">
<a href="?d-4001840-s=1&d-4001840-o=2">First Name</a></th>
<th>Mobile Number</th>
<th>Mobile Number</th>
<th>Mobile Number</th>
<th>Mobile Number</th>
<th></th></tr></thead>
It gets the first name correct, then incorrectly replaces last name with first name,
then gets mobile number correct, then incorrectly replaces all others with mobile
number.
Any ideas? Have I configured something wrong? I don't think so 'cos some of the
properties are being read in correctly, but not all.
---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
displaytag-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/displaytag-devel