Дмитрий Михневич wrote:
How can I use i18n resources (I'm using struts) in my extension of TableDecorator class?

I have "Actions" column in my table showing View | Edit | Delete links.
I just want to obtain corresponding translations from my struts *.properties file.

It would be nice if someone told me how to get struts MessageResource object.
You can get the MessageResources object in the init method and save it in your TableDecorator:

public class MyTableDecorator extends TableDecorator {

private MessageResources props;

public void init(PageContext context, Object decorated) {
props = (MessageResources)context.getRequest().getAttribute(Globals.MESSAGES_KEY);
}
}


Ed!


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
displaytag-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/displaytag-user

Reply via email to