Re: Spring Annotations supoprt for IoC on WebPages

2011-02-23 Thread James Carman
On Wed, Feb 23, 2011 at 2:46 PM, tetsuo wrote: > Yes, it is. Just use @SpringBean. > Agreed! :)

Re: Spring Annotations supoprt for IoC on WebPages

2011-02-23 Thread tetsuo
Yes, it is. Just use @SpringBean. On Wed, Feb 23, 2011 at 4:25 PM, James Carman wrote: > On Wed, Feb 23, 2011 at 8:56 AM, tetsuo wrote: >> Since Spring 3.0, scoped proxies are Serializable. So, it's perfectly >> possible to use @Configurable, @Autowired, and lots of AspectJ magic, >> for Pages

Re: Spring Annotations supoprt for IoC on WebPages

2011-02-23 Thread James Carman
On Wed, Feb 23, 2011 at 8:56 AM, tetsuo wrote: > Since Spring 3.0, scoped proxies are Serializable. So, it's perfectly > possible to use @Configurable, @Autowired, and lots of AspectJ magic, > for Pages and Components, instead of wicket-spring/@SpringBean. > > Provided, of course, that all beans y

Re: Spring Annotations supoprt for IoC on WebPages

2011-02-23 Thread tetsuo
Since Spring 3.0, scoped proxies are Serializable. So, it's perfectly possible to use @Configurable, @Autowired, and lots of AspectJ magic, for Pages and Components, instead of wicket-spring/@SpringBean. Provided, of course, that all beans you inject into Components are scope-proxied ( or @Scope(v

Re: Spring Annotations supoprt for IoC on WebPages

2011-02-23 Thread Bruno Borges
Sorry, forgot to add this: Reason why he chose to go for that approach of @Autowire and other annotations, is that @SpringBean does not support Spring Beans based on the Provider interface. I guess this could be fixed on wicket-spring. I will talk to him and see if we can issue a ticket

Re: Spring Annotations supoprt for IoC on WebPages

2011-02-23 Thread Bruno Borges
Don't you use @SpringBean on pages/panels ?? Why and how do you accomplish things? Bruno Borges www.brunoborges.com.br +55 21 76727099 "The glory of great men should always be measured by the means they have used to acquire it." - Francois de La Rochefoucauld On Tue, Feb 22, 2011 at 7:22 PM

Re: Spring Annotations supoprt for IoC on WebPages

2011-02-22 Thread Jeremy Thomerson
On Tue, Feb 22, 2011 at 4:10 PM, Bruno Borges wrote: > If enough documentation is supplied, to state that usage of such > annotations > can only be used this way: > > class MyPage extends WebPage { > @Autowired > private transient MyService service; > } > People don't read documentation :) >

Re: Spring Annotations supoprt for IoC on WebPages

2011-02-22 Thread Bruno Borges
If enough documentation is supplied, to state that usage of such annotations can only be used this way: class MyPage extends WebPage { @Autowired private transient MyService service; } Annotations like @Configured (at type level of panels, pages and components in general) and @Component would

Re: Spring Annotations supoprt for IoC on WebPages

2011-02-22 Thread James Carman
The problem with that is that it doesn't address the situation where the reference is passed elsewhere (like to a DataProvider). With the proxy-based approach (which wicket-spring does now), it does. On Tue, Feb 22, 2011 at 4:34 PM, Bruno Borges wrote: > Hi everyone, > >    A friend was playing

Re: Spring Annotations supoprt for IoC on WebPages

2011-02-22 Thread Igor Vaynberg
problem comes from the fact that if one puts @Configured/@Component and @Autowire spring annots on wicket classes and uses aspectj then component classes will get instrumented which is not what you want. -igor On Tue, Feb 22, 2011 at 1:34 PM, Bruno Borges wrote: > Hi everyone, > >    A friend wa