Hi, mateamargo. The getter @InjectSpring("somebean") public abstract SomeBean getSomething();
works fine... but be careful when you call getSomething()... if you call this getter inside an "initialize()" method, you will get an exception, because the property isn't injected yet... You must invoque this property from a listener, or PageAttachListener.pageAttached().. Saludos desde Argentina :-) 2007/4/25, mateamargo <[EMAIL PROTECTED]>:
I don't know if this should be asked here or in the SpringFramework forum. I have a bean defined and I need to inject it into a property inside a class that extends BasePage. But when I read this property I get a NullPointerException. Before that, I have tried without providing an implementation for that setter (leaving it asbtract), but Tapestry complains. So, what is the right thing to do? @InjectSpring("somebean") public abstract void SetSomething(); or @InjectSpring("somebean") public void SetSomething(SomeObject so){ this.so = so; } Thanks. -- View this message in context: http://www.nabble.com/InjectSpring-and-NullPointerException-tf3646961.html#a10185808 Sent from the Tapestry - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]