struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lukasz Lenart (Commented) (JIRA)" <>
Subject [jira] [Commented] (WW-3790) Unable to Use My Custom TextProvider from Action getText() methos
Date Mon, 16 Apr 2012 18:36:19 GMT


Lukasz Lenart commented on WW-3790:

If you check the source of ActionSupport you can spot that the Container is inject by setContainer(),
which means it will be injected after the constructor was called. You can try annotate your
action's construct with @Inject and add Container to it.

Or you can use Preparable interface to initialise you map with prepare() method.

Or create your own version of ActionSupport and do it your way ;-)
> Unable to Use My Custom TextProvider from Action getText() methos
> -----------------------------------------------------------------
>                 Key: WW-3790
>                 URL:
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core Actions
>    Affects Versions:
>            Reporter: Joaquin Diez
>             Fix For: 2.3.3
> I  build my own Text Provider with
> public class MyTextProvider extends TextProviderSupport ...
> and configure in struts.xml
> <bean class="lt.web.core.MyTextProvider" name="myTextProvider" type="com.opensymphony.xwork2.TextProvider"
> <constant name="struts.xworkTextProvider" value="myTextProvider" />
> <constant name="system" value="myTextProvider" />
> But when i make inside and action.. this.getText("whatever");   in does not run my custom

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message