Re: [Wicket-user] [tutorial] Wicket + Spring integration - revisited

2006-10-05 Thread igor.vaynberg
> * you have to keep your variables transient - very easy mistake to make, > otherwise big boo boo might happen if the dependency is serializable and > you > wont know until much later Why would you want your services serializable? because some services you are not in control of, they come from o

Re: [Wicket-user] [tutorial] Wicket + Spring integration - revisited

2006-10-05 Thread Leszek Gawron
Frank Bille wrote: > Hey Leszek > > Looks good. If you have time for it couldn't you turn this into a wiki? > In that way it's easier for users to find this. > > http://www.wicket-wiki.org.uk/wiki No problem. Since my last post I have found the proper (I hope

Re: [Wicket-user] [tutorial] Wicket + Spring integration - revisited

2006-10-05 Thread Leszek Gawron
reposting... igor.vaynberg wrote: > this is nice. > > what i do like about it > * you can inject anything anywhere > > what i dont like is > * post constructor injection like youve mentioned - delegate or not > it still sucks, a different pointcut is needed yes .. that's ugly. I have posted a qu

Re: [Wicket-user] [tutorial] Wicket + Spring integration - revisited

2006-10-05 Thread James McLaughlin
Strange. Virtually all my models do this and it works perfectly. I think you are missing the id parameter in your SpringBean declaration. Maybe that is killing you.jimOn 10/3/06, Leszek Gawron <[EMAIL PROTECTED]> wrote: Joni Freeman wrote:> Yes, it works. I use it in many places.>> JoniI have ju

Re: [Wicket-user] [tutorial] Wicket + Spring integration - revisited

2006-10-05 Thread Frank Bille
Hey LeszekLooks good. If you have time for it couldn't you turn this into a wiki? In that way it's easier for users to find this.http://www.wicket-wiki.org.uk/wiki FrankOn 10/3/06, Leszek Gawron <[EMAIL PROTECTED]> wrote: Hello,I just wanted to share another way of injecting spring services intowic

Re: [Wicket-user] [tutorial] Wicket + Spring integration - revisited

2006-10-05 Thread Johan Compagner
    - o - Gotchas - o -Every programming solutions got one. This one also. With current @Configurable implementation services get injected AFTER the injectee iscreated (after all constructors got invoked). That means this won't work:> public class LeaguePage extends BaseSquasherPage {>

Re: [Wicket-user] [tutorial] Wicket + Spring integration - revisited

2006-10-05 Thread Eelco Hillenius
Yeah. I'm using a similar patter for non-Wicket cases too. I actually prefer this to wiring using XML. Eelco On 10/3/06, Joni Freeman <[EMAIL PROTECTED]> wrote: > Yes, it works. I use it in many places. > > Joni > > On Tue, 2006-10-03 at 16:28 +0200, Matej Knopp wrote: > > But it should. I don't

Re: [Wicket-user] [tutorial] Wicket + Spring integration - revisited

2006-10-05 Thread Caleb Land
You need a contstructor that does the injecting:public GlobalNewsListModel() {     InjectorHolder.getInjector().inject(this);}On 10/3/06, Leszek Gawron < [EMAIL PROTECTED]> wrote:Joni Freeman wrote:> Yes, it works. I use it in many places. >> JoniI have just checked:> public class GlobalNewsListMod

Re: [Wicket-user] [tutorial] Wicket + Spring integration - revisited

2006-10-05 Thread Leszek Gawron
igor.vaynberg wrote: > this is nice. > > what i do like about it > * you can inject anything anywhere > > what i dont like is > * post constructor injection like youve mentioned - delegate or not it still > sucks, a different pointcut is needed yes .. that's ugly. I have posted a question on spri

Re: [Wicket-user] [tutorial] Wicket + Spring integration - revisited

2006-10-03 Thread igor.vaynberg
in life, but especially in programming, you cant have something for nothing :) -Igor Leszek Gawron wrote: > > igor.vaynberg wrote: >> you missed this: >> >> public SomeModel() { >> InjectorHolder.getInjector().inject(this); >> } >> > hmmm .. another thread local/singleton ... nice :)

Re: [Wicket-user] [tutorial] Wicket + Spring integration - revisited

2006-10-03 Thread igor.vaynberg
this is nice. what i do like about it * you can inject anything anywhere what i dont like is * post constructor injection like youve mentioned - delegate or not it still sucks, a different pointcut is needed * you have to keep your variables transient - very easy mistake to make, otherwise big b

Re: [Wicket-user] [tutorial] Wicket + Spring integration - revisited

2006-10-03 Thread Leszek Gawron
igor.vaynberg wrote: > you missed this: > > public SomeModel() { > InjectorHolder.getInjector().inject(this); > } > hmmm .. another thread local/singleton ... nice :) -- Leszek Gawron, IT Manager MobileBox sp. z o.o. +48 (61) 855 06 67

Re: [Wicket-user] [tutorial] Wicket + Spring integration - revisited

2006-10-03 Thread igor.vaynberg
you missed this: public SomeModel() { InjectorHolder.getInjector().inject(this); } -Igor Leszek Gawron-2 wrote: > > Joni Freeman wrote: >> Yes, it works. I use it in many places. >> >> Joni > I have just checked: > >> public class GlobalNewsListModel extends LoadableDetachableModel

Re: [Wicket-user] [tutorial] Wicket + Spring integration - revisited

2006-10-03 Thread Leszek Gawron
Joni Freeman wrote: > Yes, it works. I use it in many places. > > Joni I have just checked: > public class GlobalNewsListModel extends LoadableDetachableModel { > @SpringBean > private NewsService newsService; > > public NewsService getNewsService() { > return newsService;

Re: [Wicket-user] [tutorial] Wicket + Spring integration - revisited

2006-10-03 Thread Joni Freeman
Yes, it works. I use it in many places. Joni On Tue, 2006-10-03 at 16:28 +0200, Matej Knopp wrote: > But it should. I don't see reason why this wouldn't work? If I recall > correctly it worked for me. > > -Matej > > Leszek Gawron wrote: > > Eelco Hillenius wrote: > >>> I just wanted to share a

Re: [Wicket-user] [tutorial] Wicket + Spring integration - revisited

2006-10-03 Thread Matej Knopp
But it should. I don't see reason why this wouldn't work? If I recall correctly it worked for me. -Matej Leszek Gawron wrote: > Eelco Hillenius wrote: >>> I just wanted to share another way of injecting spring services into >>> wicket code. This one uses AOP. >>> >>> - o - Why anothe

Re: [Wicket-user] [tutorial] Wicket + Spring integration - revisited

2006-10-03 Thread Leszek Gawron
Eelco Hillenius wrote: >> I just wanted to share another way of injecting spring services into >> wicket code. This one uses AOP. >> >> - o - Why another approach? - o - >> >> Using wicket-spring along with wicket-spring-annot works nicely for >> components (althought you have to rememb

Re: [Wicket-user] [tutorial] Wicket + Spring integration - revisited

2006-10-03 Thread Eelco Hillenius
> I just wanted to share another way of injecting spring services into > wicket code. This one uses AOP. > > - o - Why another approach? - o - > > Using wicket-spring along with wicket-spring-annot works nicely for > components (althought you have to remember not initializing it > yo

[Wicket-user] [tutorial] Wicket + Spring integration - revisited

2006-10-03 Thread Leszek Gawron
Hello, I just wanted to share another way of injecting spring services into wicket code. This one uses AOP. - o - Why another approach? - o - Using wicket-spring along with wicket-spring-annot works nicely for components (althought you have to remember not initializing it yourself)