
| Key: |
DISPL-172
|
| Type: |
Bug
|
| Status: |
Closed
|
| Resolution: |
Cannot Reproduce
|
| Priority: |
Critical
|
| Reporter: |
Olaru Cristian
|
| Votes: |
0
|
| Watchers: |
0
|
|
If you were logged in you would be able to see more operations.
|
|
|
DisplayTag
Created: 12/Jan/05 03:15 AM
Updated: 26/Oct/05 03:58 PM
|
|
| Component/s: |
I18N
|
| Affects Version/s: |
1.1
|
| Fix Version/s: |
None
|
|
|
Time Tracking:
|
|
Original Estimate:
|
3 days
|
|
|
Remaining Estimate:
|
3 days
|
|
|
Time Spent:
|
Not Specified
|
|
|
|
|
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!!!
|
|
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!!! |
Show » |
|
in a TableDecorator you have access to the PageContext (getPageContext())
Struts leaves the current users Locale in the session under Globals.LOCALE_KEY (Globals is in package org.apache.struts). Some thing along the lines of:
Locale loc = (Locale)getPageContext().findAttribute(Globals.LOCALE_KEY) ;
Hope this helps.
Gareth