I think I found intermediate solution - I'm going to extend struts.dtd
and define new structure bean-selector. It will contain a class which
will provide aliases ;-)
The change is backward compatible as the element isn't required, it is
optional. And thus also allow to move all the aliases from
BeanSelectionProvider to struts-default.xml
<!ELEMENT bean-selector (#PCDATA)>
<!ATTLIST bean-selector
class CDATA #REQUIRED
>
Regards
--
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/
2013/11/18 Lukasz Lenart <[email protected]>:
> Hi,
>
> As I'm working in extracting Velocity support into a plugin, I have
> faced a small problem: how to register alias to allow override
> VelocityManager by user?
>
> Right now, it is done via BeanSelectionProvider [1] where each class
> which can be aliased is defined statically and then the provider is
> statically added in Dispatcher [2]. Now I need a way to allow define
> the same but inside the plugin.
>
> The first idea is to define a new type of configuration file:
> struts-aliases.xml but I would like to have a programmatic way, any
> thoughts?
>
> [1]
> https://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/config/BeanSelectionProvider.java?view=markup#l366
> [2]
> https://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/Dispatcher.java?view=markup#l449
>
>
> Regards
> --
> Łukasz
> + 48 606 323 122 http://www.lenart.org.pl/
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]