On Tue, 2005-10-25 at 18:41 +0200, Stefan Arentz wrote:
> Better idea! Add some AOP and annotation magic to the mix!
> 
>   public class HelloWorldWebPage extends WebPage
>   {
>       @SpringBeanReference("dutchHelloWorldService")
>       private transient HelloWorldService helloWorldService;
> 
>       public void setHelloWorldService(HelloWorldService  
> helloWorldService)
>       {
>           this.helloWorldService = helloWorldService;
>       }
> 
>       public HelloWorldWebPage()
>       {
>           add(new Label("message", this.helloWorldService.getMessage 
> ()));
>       }
>   }
> 
> I'm using all standard Wicket classes. No weird mixing of Spring  
> specific classes into the hierarchy.

This is very cool stuff! This is IMO just the way how spring integration
should be done (transient fields, IOC + reinjection at proper places). I
have one question though. Is it still possible to instantiate these
components normally so that there's no AOP magic behind? When writing
unit tests there's normally no spring context available. The service
mocks are manually wired instead.

-- 
Joni Suominen <[EMAIL PROTECTED]>



-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to