struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lukasz Lenart <lukaszlen...@apache.org>
Subject Re: Webwork -> Struts 2.0.x migration xwork API issue related to ProxyFactories
Date Tue, 18 Dec 2012 13:36:03 GMT
2012/12/18 Eero Nevalainen <enevalainen@gmail.com>:
> To respond to my own post to record a bit more information about the
> actual problem here, in case someone has any ideas:
>
> What the xwork 1-style ActionProxyFactory does is that it returns an
> ActionInvocation. Our legacy code further extends the
> DefaultActionInvocation in order to get to override createResult --
> and this has something to do with integrating Tiles views with Spring.
>
> In xwork2, the create-method of the factory actually returns an
> ActionProxy. Now, I can certainly create my own proxies to return, but
> now the ActionInvocation is hidden inside the Proxy and is created in
> DefaultActionProxy's prepare() method.
>
> So I guess what the question is -- how does one override
> createResult() or equivalent in the new-style API...

Take a look on RestActionProxyFactory which overrides
DefaultActionProxyFactory, just write your own implementation and used
it as below:

<bean type="com.opensymphony.xwork2.ActionProxyFactory"
name="myActionFactory" class="com.demo.MyActionProxyFactory" />
<constant name="struts.actionProxyFactory" value="myActionFactory" />


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

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


Mime
View raw message