Thanks guys, works like a charm :) On 3/21/06, James Carman <[EMAIL PROTECTED]> wrote: > I believe all you have to do is set up a /WEB-INF/applicationContext.xml > file with your Spring beans in it. Then, drop the tapestry-spring.jar file > in your /WEB-INF/lib directory. Then you can access the Spring beans by > injecting them into your pages/components: > > @InjectObject("spring:MyDao") > public MyDao getMyDao(); > > > > -----Original Message----- > From: Izak Wessels [mailto:[EMAIL PROTECTED] > Sent: Tuesday, March 21, 2006 8:17 AM > To: Tapestry users > Subject: Re: Matt, question about your Tapestry 4.0 - Spring Integration > > Thank you for the link. However, the documentation seems to be a "work > in progress" so to speak. Do I just need to download the > tapestry-spring-0.1.1.jar and place it in my classpath? From the > website I gather that I need to setup spring in my web.xml, any other > actions required? > > On 3/21/06, Jimmi Dyson <[EMAIL PROTECTED]> wrote: > > Take a look at tapestry-spring that Howard has produced. Works great > > with no extra code required. > > > > http://howardlewisship.com/tapestry-javaforge/tapestry-spring/ > > > > -----Original Message----- > > From: Izak Wessels [mailto:[EMAIL PROTECTED] > > Sent: 21 March 2006 12:30 > > To: Tapestry users > > Subject: Matt, question about your Tapestry 4.0 - Spring Integration > > > > Matt, > > > > > > I recently came across the following forum posting by yourself : > > ( I wasn't subscribed to the mailing list when you made this forum > > posting, > > so excuse the repeat ) > > ------------------------------------------------------------------------ > > ------------------ > > Does the following wiki page still reflect the current/recommended way > > of integrating Tapestry 4.0 with Spring? > > > > http://wiki.apache.org/jakarta-tapestry/Tapestry4Spring > > > > I used something similar in my project. While it works - it doesn't > > seem to be the "built-in support for Spring" that I'd suspect from > > Tapestry/Hivemind. Ideally, no Java code would be needed. > > > > Here's what I did: > > > > package org.appfuse.web; > > > > .... > > > > public class SpringFactory extends SpringBeanFactoryHolderImpl > > implements RegistryShutdownListener { > > private WebContext context; > > > > public void setContext(WebContext webcontext) { > > context = webcontext; > > } > > > > public BeanFactory getBeanFactory() { > > if (super.getBeanFactory() == null) { > > ApplicationContext ctx = (ApplicationContext) > > > > context.getAttribute(WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ > > ATTRIBUTE); > > setBeanFactory(ctx); > > } > > return super.getBeanFactory(); > > } > > > > public void registryDidShutdown() { > > ((ConfigurableApplicationContext) getBeanFactory()).close(); > > } > > } > > > > /WEB-INF/hivemodule.xml: > > > > <implementation > > service-id="hivemind.lib.DefaultSpringBeanFactoryHolder"> > > <invoke-factory> > > <construct autowire-services="false" > > class="org.appfuse.web.SpringFactory"> > > <event-listener service-id="hivemind.ShutdownCoordinator"/> > > <set-object property="context" > > value="service:tapestry.globals.WebContext"/> > > </construct> > > </invoke-factory> > > </implementation> > > > > Thanks, > > > > Matt > > ------------------------------------------------------------------------ > > ------------------ > > > > I agree with your statement that using a third party lib thats only in > > alpha > > stage, doesn't seem quite right. > > > > My question however is, how do you actually > > apply this strategy in your java code? Do I need to instantiate an > > instance of BeanFactory and then call getBeanFactory() and go from > > there, or is it all > > done automatically? > > > > Any help would be much appreciated, > > > > -- Izak > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]