Re: WW 2.2 Shopping-cart example question

tm_jee <[email protected]> Fri, 29 Dec 2006 01:33:48 CST
Newsgroups gmane.comp.java.open-symphony.webwork
Message-ID <25657110.1167377658706.JavaMail.os-j2ee@opensymphony01.managed.contegix.com>
Hi Spurcell,

I think it's injected through spring.
in webwork.properties
[code]
# spring integration
webwork.objectFactory=spring
webwork.objectFactory.spring.autoWire=type
[/code]

another way would be to have a actionContext-webwork.xml that allows spring to create all webwork's action and inject the dependencies as well.

xwork.xml
[code]
 <action .... class="myAction">
   ....
 </action>
[/code]

applicationContext-webwork.xml
[code]
 <bean name="myAction" ....>
    <!-- inject dependencies etc. -->
    <ref bean=".... />
 </bean>
[/code]

cheers.
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.opensymphony.com/thread.jspa?threadID=55600&messageID=110965#110965