2017-06-26 18:28 GMT+02:00 i...@flyingfischer.ch <i...@flyingfischer.ch>:
> Thanks for the inputs. I cant't get this to work. Sorry, this is rather
> a topic for user list. I'll wait to see some examples coming around. For
> the moment being I'll use, not very sophisticated my utility class
> below. This works fine. Though I think Struts should have somthing like
> this integrated. Before 2.5 this was as easy as "getText(key)".

It must be a bean create by the framework, e.g. an action, then the
LocalizedTextProvider gets injected. If you want to use it in some
other context you can use this approach:

LocalizedTextProvider provider =
ActionContext.getContext().getInstance(LocalizedTextProvider.class)
LocaleProviderFactory factory =
ActionContext.getContext().getInstance(LocaleProviderFactory.class)

provider.findText("a.key", factory.createLocaleProvider().getLocale());

> StringEscapeUtils.unescapeHtml4(value.replaceAll("''", "'"));

Why do you do this?


Regards
-- 
Ɓukasz
+ 48 606 323 122 http://www.lenart.org.pl/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@struts.apache.org
For additional commands, e-mail: dev-h...@struts.apache.org

Reply via email to