The following comment has been added to this issue:
Author: Gareth Davis
Created: Wed, 12 Jan 2005 8:15 AM
Body:
there is some new stuff in display tag that I not very familar to do with
pluging different i18n provides in to it.
The simplest solution for you (see that you're using struts anyway) is to use
the TagUtils.message() method in org.apache.struts.taglib.
>From MessageTag.doStart(){
String message =
TagUtils.getInstance().message(
pageContext,
this.bundle,
this.localeKey,
key,
args);
}
or a even quicker/simplier way is to get the MessageResources is
getPageContent().findAttribute(Globals.MESSAGE_KEY);
Note this should give you the default messages, which may not be what you want
(struts modules and all)
Gareth
---------------------------------------------------------------------
View this comment:
http://jira.codehaus.org/browse/DISPL-172?page=comments#action_28877
---------------------------------------------------------------------
View the issue:
http://jira.codehaus.org/browse/DISPL-172
Here is an overview of the issue:
---------------------------------------------------------------------
Key: DISPL-172
Summary: Internationalization for TableDecorator
Type: Bug
Status: Unassigned
Priority: Critical
Original Estimate: 3 days
Time Spent: Unknown
Remaining: 3 days
Project: DisplayTag
Components:
I18N
Versions:
1.1
Assignee:
Reporter: Olaru Cristian
Created: Wed, 12 Jan 2005 3:15 AM
Updated: Wed, 12 Jan 2005 8:15 AM
Description:
I extend TableDecorator for different sorting that what it is see in the
column. The content of cells for this column must be internationalizated:
For examle a method:
public String getListaComenzi3()
{
VizualizareComenzi lObject= (VizualizareComenzi)getCurrentRowObject();
int lIndex= getListIndex();
String sar ="";
if(lObject.getStareFactura().equals("2"))
sar = "<a href='/Festino/vizualizeazaFactura.do?comanda_id=" + lObject.getId()+
"&client_id=" + lObject.getCliId() + "' > " +
"<img src='images/check.gif' alt='Visualizza fattura' border='0'>" +
" </a>";
return sar;
}
In this case the "alt" must be language dependent but I dont have acces to the
current locale.
Do you see a method to have acces to Struts localization in TableDecorator.
Or another method for internationalize in this case (I need Struts localization
, not request)???
Thanks!!!
---------------------------------------------------------------------
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
-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
displaytag-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/displaytag-devel