> 2012/10/4 Davis, Chad <chad.da...@emc.com>:
> > And, since I think I saw your name on some comments in the TextProvider,
> I wonder what constructors get invoked when the TextProvider is injected in
> the TextProviderFactory on ActionSupport.  The default TextProviderSupport
> has references to locale provider and a class, which can be set via a
> constructor.  But I suspect the DI must only use the parameterless
> constructor.  Is this true?  In what cases do those other constructors get
> invoked?
> 
> Yeah, it was my first bigger addition to Struts 2 ;-) It isn't an optimal one 
> ;-)
> 

Hey, no apologies needed.  Beggars can't be choosers ;)  The struts 2 code is 
some of the best code I work with . . . so I'm not complaining.

> Anyway, you're right. DI will use the default constructor, the others are used
> in other places (TextProviderFactory and ) - that's why it isn't an optimal
> solution. DI supports also constructor injections, in the same way as property
> injection, just add @Inject to constructor.
> 

I'll check this out and get back to you.   There's another bit, a complication 
perhaps, in that I'm trying to extend the ActionSupport, not replace it.  My 
use case is that some folks before my time wrote their own i18n layer instead 
of using the framework's and I want to layer those text lookups in front of the 
framework's own.  




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

Reply via email to