You need to inject the service's proxy into the service itself, and invoke methods on that.
On Tue, Jul 13, 2010 at 5:39 PM, Taylor Mathewson <taylor.mathew...@gmail.com> wrote: > Hi all, > > This question pertains to Tapestry 5.1 > > I find myself in a position where I need to call one method from another in > the same service, without circumventing the interception around this method. > > Using this.method() will obviously not work. I've tried injecting the > service into itself as a constructor, e.g.: > > class ServiceImpl{ > private Service service; > > public ServiceImpl(Service service){ > this.service = service; > } > > @Override > public void method1(){ > //arbitrary implementation > } > > public void method2(){ > //do some stuff > service.method1(); > } > > } > > But this does not work, on debug, the service member is actual a direct > instance of ServiceImpl. > > Is there any way to do this without adding a hacky separate service for to > call out to for the sole purpose of calling back in? > > Thanks, > Taylor > -- Howard M. Lewis Ship Creator of Apache Tapestry The source for Tapestry training, mentoring and support. Contact me to learn how I can get you up and productive in Tapestry fast! (971) 678-5210 http://howardlewisship.com --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org