Re: T5 - Service injection and ioc

2007-06-01 Thread Blackwings
"UserAuthenticator") private UserAuthenticator _authenticator; But, it doesnt seems to work, im angry also, why isn't more documentation, with more examples and explanations?. Thanks in advance -- View this message in context: h

Re: T5 - Service injection and ioc

2007-06-01 Thread vidrilon
cator _authenticator; But, it doesnt seems to work, im angry also, why isn't more documentation, with more examples and explanations?. Thanks in advance -- View this message in context: http://www.nabble.com/T5---Service-injection-and-ioc-tf3834669.html#a10920353 Sent from the Tapestry - User

Re: T5 - Service injection and ioc

2007-06-01 Thread Howard Lewis Ship
On 6/1/07, Blackwings <[EMAIL PROTECTED]> wrote: Thanks! I read the doc 2 or 3 times completely, but sometimes my english make the thing difficult to understand well, especially when first example start with MyModule... I focused on this and didn't pay attention enought to the SubModule part.

Re: T5 - Service injection and ioc

2007-06-01 Thread Blackwings
Thanks! I read the doc 2 or 3 times completely, but sometimes my english make the thing difficult to understand well, especially when first example start with MyModule... I focused on this and didn't pay attention enought to the SubModule part. I hope this thread will help other like me ;) 20

Re: T5 - Service injection and ioc

2007-06-01 Thread Howard Lewis Ship
Actually, Howard doesn't have to confirm this as the code confirms this, and the comments, capturing Howard's thoughts, confirm this. On 6/1/07, Blackwings <[EMAIL PROTECTED]> wrote: /cry... Does Howard confirm this? 2007/6/1, Joshua Jackson <[EMAIL PROTECTED]>: > > I think you can only have o

Re: T5 - Service injection and ioc

2007-06-01 Thread Howard Lewis Ship
Please read the documentation. It explicitly states whats going on, how Tapestry decides on the name of the class it will load. There's no particular advantage to having multiple modules; espcially with ServiceBinder (new in 5.0.4) your module classes tend to be very small. There's a @SubModule

Re: T5 - Service injection and ioc

2007-06-01 Thread Blackwings
(className); _builder.add(moduleClass); Kristian Marinkovic < [EMAIL PROTECTED]> 01.06.2007 11:26 Bitte antworten an "Tapestry users" An "Tapestry users" Kopie Thema Re: T5 - Service injection and ioc i assume you have used the tapestry archetype :) wi

Re: T5 - Service injection and ioc

2007-06-01 Thread Kristian Marinkovic
der.add(moduleClass); Kristian Marinkovic <[EMAIL PROTECTED]> 01.06.2007 11:26 Bitte antworten an "Tapestry users" An "Tapestry users" Kopie Thema Re: T5 - Service injection and ioc i assume you have used the tapestry archetype :) with the SubModule

Re: T5 - Service injection and ioc

2007-06-01 Thread Kristian Marinkovic
.ioc.test.module.AppModule, com.poi.tapestry5.ioc.test.module.MyModule Blackwings <[EMAIL PROTECTED]> 01.06.2007 11:14 Bitte antworten an "Tapestry users" An "Tapestry users" Kopie Thema Re: T5 - Service injection and ioc /cry... Does Howard confirm this? 2007/6/1, Joshua

Re: T5 - Service injection and ioc

2007-06-01 Thread Blackwings
/cry... Does Howard confirm this? 2007/6/1, Joshua Jackson <[EMAIL PROTECTED]>: I think you can only have one Module loaded by Filter (CMIIW). Last time I tried I only can load AppModule, and the other Module entries are ignored. On 6/1/07, Blackwings <[EMAIL PROTECTED]> wrote: > So, I created

Re: T5 - Service injection and ioc

2007-06-01 Thread Joshua Jackson
I think you can only have one Module loaded by Filter (CMIIW). Last time I tried I only can load AppModule, and the other Module entries are ignored. On 6/1/07, Blackwings <[EMAIL PROTECTED]> wrote: So, I created my own Module in the same package than AppModule, following the naming convention :

Re: T5 - Service injection and ioc

2007-06-01 Thread Blackwings
So, I created my own Module in the same package than AppModule, following the naming convention : public final class UserModule { public UserService buildUserService() { return new UserServiceImpl(); } } And I still have the error, the same others have, "No service implements the interface

Re: T5 - Service injection and ioc

2007-06-01 Thread Joshua Jackson
Of course you can create your own Module, but AppModule it the ones automatically loaded because it is configured in your web.xml On 6/1/07, Blackwings <[EMAIL PROTECTED]> wrote: Still the same question... Are we force to use only the AppModule? Can we create our own module? This is the question

Re: T5 - Service injection and ioc

2007-05-31 Thread Blackwings
Still the same question... Are we force to use only the AppModule? Can we create our own module? This is the question. I think we know how to implement, inject and create a Service. I achieved to make it works only when finally I declared my service builder in AppModule but we still don't know how

Re: T5 - Service injection and ioc

2007-05-31 Thread Joshua Jackson
On 6/1/07, vidrilon <[EMAIL PROTECTED]> wrote: Did i understood well?? Could you make it work? I'm also having the same problem, i have created another module, UserAuthenticatorModule for validating a login form, but have the same message: No service implements the interface org.clinica.bd.pag

Re: T5 - Service injection and ioc

2007-05-31 Thread vidrilon
- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/T5---Service-injection-and-ioc-tf3834669.html#a10898922 Sent from the Tapestry - User mailing list archive at Nabble.c

Re: T5 - Service injection and ioc

2007-05-31 Thread Joshua Jackson
On 5/30/07, Davor Hrg <[EMAIL PROTECTED]> wrote: I tried @Inject Session session; but it didn't work. you probably have an error in log from tapestry demanding for the field to be private... try: @Inject private Session session; Davor Hrg Thank you so much. I've got it running now. --

Re: T5 - Service injection and ioc

2007-05-30 Thread Blackwings
Ok I found the problem and it was not my code but the packages!! Services and modules have to be in papo.services, if I declared in web.xml tapestry.app-package with papo. But I was able to declare my builder in AppModule but I still doesn't achieve to create my own module, in the same package, w

Re: T5 - Service injection and ioc

2007-05-30 Thread Blackwings
The only error I have is : # java.lang.ClassNotFoundException caught an exception while obtaining a class file for papo.pages.Start exception java.lang.RuntimeException: Error obtaining injected value for field papo.pages.Start._userService: No service implements the interface papo.ioc.servi

Re: T5 - Service injection and ioc

2007-05-30 Thread Davor Hrg
I tried @Inject Session session; but it didn't work. you probably have an error in log from tapestry demanding for the field to be private... try: @Inject private Session session; Davor Hrg On 5/30/07, Joshua Jackson <[EMAIL PROTECTED]> wrote: I found that the @Service annotation is not

Re: T5 - Service injection and ioc

2007-05-30 Thread Blackwings
Thanks for your answer, but in the doc I found that : By convention, module builder class names end in Module and are final classes. And my module is : package papo.ioc.services; public final class UserModule { public UserService build() { return new UserServiceImpl(); } } Do we have to use

Re: T5 - Service injection and ioc

2007-05-29 Thread Joshua Jackson
I found that the @Service annotation is not available anymore in tapestry-core-5.0.4 So how do I inject a service that was created by the AppModule into my web Page/Component ? Let's say the Session service created by the tapestry-hibernate module. I tried @Inject Session session; but it didn't

Re: T5 - Service injection and ioc

2007-05-29 Thread Howard Lewis Ship
You don't need the MANIFEST.MF. You do need to name your module correctly, it should be AppModule. The documention is *very clear* on the naming for that. Also, you should consider letting Tapestry IoC inject the Log ( org.apache.commons.logging.Log) for your service; cleans up a lot of code th

Re: T5 - Service injection and ioc

2007-05-29 Thread Blackwings
So, I'm now on 5.04 and I re-read the documentation about ioc to be sure I didn't do a mistake when I declared my service. The module is final and follow the naming convention: package papo.ioc.services; public final class UserModule { public UserService build() { return new UserServiceImpl(

Re: T5 - Service injection and ioc

2007-05-29 Thread Blackwings
I was using the 5.03. I just changed for the 5.04 then I tried your proposition : "No service implements the interface papo.ioc.services.UserService." But my implementation, UserServiceImpl is in the same package than its interface UserService and implements it. The module UserModule that contai

Re: T5 - Service injection and ioc

2007-05-29 Thread Davor Hrg
try: @Inject private UserService _userService; you haven't mentioned the version code above is for 5.0.4, I'm not sure for older versions Davor Hrg On 5/29/07, Blackwings <[EMAIL PROTECTED]> wrote: Hi, I think I'm not using correctly the tapestry-ioc since my page call itself my module to ge

T5 - Service injection and ioc

2007-05-29 Thread Blackwings
Hi, I think I'm not using correctly the tapestry-ioc since my page call itself my module to get the service implementation instance (as service): UserModule public class UserModule { public static UserService buildUserService() { return new UserServiceImpl(); } } UserService public inte