struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Łukasz Lenart <lukasz.len...@gmail.com>
Subject Re: overriding framework components
Date Thu, 04 Oct 2012 19:08:33 GMT
2012/10/4 Davis, Chad <Chad.Davis@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 ;-)

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.


Regards
-- 
Łukasz
mobile +48 606 323 122 http://www.lenart.org.pl/
Warszawa JUG conference - Confitura http://confitura.pl/

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


Mime
View raw message