Thanks, got the annotations approach working now :)

Turned out I did need to use the 1.2.4 version from Maven repository like 
Martijn suggested as 
I got an error at runtime with the 1.2.5 version from there.

Found the correct branches in svn with the example which was useful. Had 
wrongly assumed trunk
would have latest code initially.

Seem to be at least a couple of caveats with this proxy based approach that I 
managed to encounter
in my first two 'hello world' attempts:

1. Can't inject a final class as cglib can't subclass it. 
2. Got a cglib error injecting a bean that didn't have a no-args constructor.

Will try to stick to interfaces.

Thanks again,
Derek

-----Original Message-----
From: [EMAIL PROTECTED] on behalf of Peter Thomas
Sent: Fri 4/13/2007 10:29 AM
To: [EMAIL PROTECTED]
Subject: Re: [Wicket-user] Spring integration and which wicket version
 
Hi,

You can also consider a quick and dirty approach to getting hold of a spring
managed bean like this in the init() method of your wicket application, but
you do have to import a couple of Spring classes.

    @Override
    public void init() {
        super.init();
        ApplicationContext applicationContext =
            
WebApplicationContextUtils.getWebApplicationContext(getServletContext());

        myService = (MyService) applicationContext.getBean("myService");
    }

Then the rest is as per the "Application Object Approach" in the wicket
spring-integration wiki but without the dependency on wicket-spring and the
extra stuff in web.xml  Should be easy to switch between this and the wicket
recommended approach - so this may be useful to get you started if you get
stuck etc.

Thanks,

Peter.

On 4/13/07, Martijn Dashorst <[EMAIL PROTECTED]> wrote:
>
> The 1.2.5 maven jars have been misplaced in some way. This will be
> fixed with 1.2.6, but repository policies don't have much room for
> replacing existing jars. Can't do much about that.
>
> Wicket Spring 1.2.4 should work, as I haven't heard complaints with
> those dependencies, and have been recommending them for a while.
>
> One other option would be to use the distributions that are available
> from sourceforge, and install/copy them locally into the repo. AFAIK
> these are golden, even for 1.2.5.
>
> Martijn
>
>
> On 4/13/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > Yes, but I got the same problem with
> >
> >        <artifactId>wicket-spring</artifactId>
> >        <version>1.2.4</version>
> >
> >        <artifactId>wicket-spring-annot</artifactId>
> >        <version>1.2.4</version>
> >
> > besides, one wouldn't expect something to be in 1.2.4 but not in 1.2.5.
> >
> >
> >
> > -----Original Message-----
> > From: [EMAIL PROTECTED] on behalf of Martijn
> Dashorst
> > Sent: Fri 4/13/2007 9:12 AM
> > To: [EMAIL PROTECTED]
> > Subject: Re: [Wicket-user] Spring integration and which wicket version
> >
> > So you're still using wicket-spring-1.2.5 :)
> >
> > >     <dependency>
> > >       <groupId>wicket</groupId>
> > >       <artifactId>wicket</artifactId>
> > >       <version>1.2.5</version>
> > >       <scope>compile</scope>
> > >     </dependency>
> > >     <dependency>
> > >       <groupId>wicket</groupId>
> > >       <artifactId>wicket-spring</artifactId>
> > ****>       <version>1.2.5</version>
> > >       <scope>compile</scope>
> > >     </dependency>
> > >     <dependency>
> > >       <groupId>wicket</groupId>
> > >       <artifactId>wicket-spring-annot</artifactId>
> > ****>       <version>1.2.5</version>
> > >       <scope>compile</scope>
> > >     </dependency>
> >
> >
> > Martijn
> >
> > On 4/13/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > > Thanks for the quick reply, but wicket-spring 1.2.4 doesn't seem to
> have wicket.spring.injection either.
> > >
> > > Currently I have:
> > >
> > >     <dependency>
> > >       <groupId>wicket</groupId>
> > >       <artifactId>wicket</artifactId>
> > >       <version>1.2.5</version>
> > >       <scope>compile</scope>
> > >     </dependency>
> > >     <dependency>
> > >       <groupId>wicket</groupId>
> > >       <artifactId>wicket-spring</artifactId>
> > >       <version>1.2.5</version>
> > >       <scope>compile</scope>
> > >     </dependency>
> > >     <dependency>
> > >       <groupId>wicket</groupId>
> > >       <artifactId>wicket-spring-annot</artifactId>
> > >       <version>1.2.5</version>
> > >       <scope>compile</scope>
> > >     </dependency>
> > >
> > > and get:
> > >
> > > package wicket.spring.injection does not exist
> > >
> > >
> > > Regards,
> > > Derek
> > >
> > >
> > > -----Original Message-----
> > > From: [EMAIL PROTECTED] on behalf of Martijn
> Dashorst
> > > Sent: Fri 4/13/2007 8:41 AM
> > > To: [EMAIL PROTECTED]
> > > Subject: Re: [Wicket-user] Spring integration and which wicket version
> > >
> > > Use wicket-spring 1.2.4 It is compatible with wicket 1.2.5.
> > >
> > > Martijn
> > >
> > >
> > > On 4/13/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > > > Hi,
> > > >
> > > > Setting out with Wicket for the first time and looking for some
> advice on which version to use.
> > > >
> > > > Have started out with the latest release (1.2.5) but that doesn't
> seem to include the
> > > > wicket.spring.injection package needed for the annotation based
> approach to Spring integration
> > > > described here:
> > > >
> > > >
> http://cwiki.apache.org/WICKET/spring.html#Spring-AnnotationbasedApproach
> > > >
> > > > Doubt I'll be at production stage for a couple of months yet so I
> don't mind using a development
> > > > version but as I'm new to Wicket I'd probably be better off with
> something reasonably stable and
> > > > in line with the existing docs.
> > > >
> > > > Get the impression there are 1.3 and 2.0 development strands in
> progress. Should I use one of these
> > > > or should I stick with 1.2.5 and use an alternative approach to
> integrating Spring?
> > > >
> > > > Or can I just use a later version of wicket-spring and stick with
> 1.2.5 for the rest?
> > > >
> > > > Appreciate any advice.
> > > >
> > > > Regards,
> > > > Derek
> > > >
> > > > ***** Email confidentiality notice *****
> > > > This message is private and confidential. If you have received this
> message in error, please notify us and remove it from your system.
> > > >
> > > > The London School of Economics and Political Science (the School) is
> a company limited by guarantee, registered in England and Wales, under
> registered number 00070527, and having its registered office at 10th Floor,
> Tower One, Houghton Street, London WC2A 2AE.
> > > >
> > > > The inclusion of this information does not of itself make this email
> a business document of the School and, to the maximum extent permitted by
> law, the School accepts no liability for the content and opinions in any
> non-business emails.
> > > >
> > > >
> -------------------------------------------------------------------------
> > > > Take Surveys. Earn Cash. Influence the Future of IT
> > > > Join SourceForge.net's Techsay panel and you'll get the chance to
> share your
> > > > opinions on IT & business topics through brief surveys-and earn cash
> > > >
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> > > > _______________________________________________
> > > > Wicket-user mailing list
> > > > [EMAIL PROTECTED]
> > > > https://lists.sourceforge.net/lists/listinfo/wicket-user
> > > >
> > >
> > >
> > > --
> > > Learn Wicket at ApacheCon Europe: http://apachecon.com
> > > Join the wicket community at irc.freenode.net: ##wicket
> > > Wicket 1.2.5 will keep your server alive. Download Wicket now!
> > > http://wicketframework.org
> > >
> > >
> -------------------------------------------------------------------------
> > > Take Surveys. Earn Cash. Influence the Future of IT
> > > Join SourceForge.net's Techsay panel and you'll get the chance to
> share your
> > > opinions on IT & business topics through brief surveys-and earn cash
> > >
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> > > _______________________________________________
> > > Wicket-user mailing list
> > > [EMAIL PROTECTED]
> > > https://lists.sourceforge.net/lists/listinfo/wicket-user
> > >
> > >
> > > ***** Email confidentiality notice *****
> > > This message is private and confidential. If you have received this
> message in error, please notify us and remove it from your system.
> > >
> > > The London School of Economics and Political Science (the School) is a
> company limited by guarantee, registered in England and Wales, under
> registered number 00070527, and having its registered office at 10th Floor,
> Tower One, Houghton Street, London WC2A 2AE.
> > >
> > > The inclusion of this information does not of itself make this email a
> business document of the School and, to the maximum extent permitted by law,
> the School accepts no liability for the content and opinions in any
> non-business emails.
> > >
> -------------------------------------------------------------------------
> > > Take Surveys. Earn Cash. Influence the Future of IT
> > > Join SourceForge.net's Techsay panel and you'll get the chance to
> share your
> > > opinions on IT & business topics through brief surveys-and earn cash
> > >
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> > > _______________________________________________
> > > Wicket-user mailing list
> > > [EMAIL PROTECTED]
> > > https://lists.sourceforge.net/lists/listinfo/wicket-user
> > >
> > >
> > >
> >
> >
> > --
> > Learn Wicket at ApacheCon Europe: http://apachecon.com
> > Join the wicket community at irc.freenode.net: ##wicket
> > Wicket 1.2.5 will keep your server alive. Download Wicket now!
> > http://wicketframework.org
> >
> >
> -------------------------------------------------------------------------
> > Take Surveys. Earn Cash. Influence the Future of IT
> > Join SourceForge.net's Techsay panel and you'll get the chance to share
> your
> > opinions on IT & business topics through brief surveys-and earn cash
> >
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> > _______________________________________________
> > Wicket-user mailing list
> > [EMAIL PROTECTED]
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> >
> >
> > ***** Email confidentiality notice *****
> > This message is private and confidential. If you have received this
> message in error, please notify us and remove it from your system.
> >
> > The London School of Economics and Political Science (the School) is a
> company limited by guarantee, registered in England and Wales, under
> registered number 00070527, and having its registered office at 10th Floor,
> Tower One, Houghton Street, London WC2A 2AE.
> >
> > The inclusion of this information does not of itself make this email a
> business document of the School and, to the maximum extent permitted by law,
> the School accepts no liability for the content and opinions in any
> non-business emails.
> >
> -------------------------------------------------------------------------
> > Take Surveys. Earn Cash. Influence the Future of IT
> > Join SourceForge.net's Techsay panel and you'll get the chance to share
> your
> > opinions on IT & business topics through brief surveys-and earn cash
> >
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> > _______________________________________________
> > Wicket-user mailing list
> > [EMAIL PROTECTED]
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> >
> >
> >
>
>
> --
> Learn Wicket at ApacheCon Europe: http://apachecon.com
> Join the wicket community at irc.freenode.net: ##wicket
> Wicket 1.2.5 will keep your server alive. Download Wicket now!
> http://wicketframework.org
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share
> your
> opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Wicket-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>


***** Email confidentiality notice *****
This message is private and confidential. If you have received this message in 
error, please notify us and remove it from your system.
 
The London School of Economics and Political Science (the School) is a company 
limited by guarantee, registered in England and Wales, under registered number 
00070527, and having its registered office at 10th Floor, Tower One, Houghton 
Street, London WC2A 2AE.
 
The inclusion of this information does not of itself make this email a business 
document of the School and, to the maximum extent permitted by law, the School 
accepts no liability for the content and opinions in any non-business emails.

<<winmail.dat>>

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wicket-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to