The problem you're going to face is that Wicket is an "unmanaged"
framework.  Meaning that something else doesn't create stuff for you.  You
create your Links, Labels, TextFields, etc.  So, the container can't really
do the injection.  Now, what we could come up with would be an aspect that
does the dirty work for you, but that would mean that you have to introduce
AspectJ into your build (not a big deal).  It would be interesting to see
how this works.

By the way, with my stuff, you can just do
AbstractCdiPlugin.get().inject(whateverObject) and it will do the injection
for you.  So, you can put that in your session class' constructor, for
instance.  For the application, you can use the plugin's inject() method
inside your init() method (you have to instantiate and install it there

On Mon, Mar 29, 2010 at 1:23 PM, Ericksen, Mark W (IS) <> wrote:

> Thanks Olivier, Iskandar, and James!
> After getting Weld integration to work with the weld-wicket jar I
> realized that the integration is limited to classes that subclass from
> WebPage (or Page I suppose) to work within a request cycle.  I cannot
> inject a DAO into a session or a singleton into an application class for
> example.  In a JSF2 project there is no limitations.  Plus the ability
> to annotate scope would be nice.
> This makes me wonder what the future holds for Wicket and JEE6.  Is
> there work being done to fully integrate Wicket with JEE6's newly
> defined set of supported JSRs?
> It would be nice to see a comparison chart of JEE6 features and Wicket's
> current and expected future support for such features.  I've been
> searching for something like this but haven't found anything.
> I'd love to see Wicket fully support JEE6 and become a drop in
> replacement for JSF2.  This doesn't seem to be the case just yet.  If
> I'm wrong be sure to let me know!
> -Mark
> -----Original Message-----
> From: Olivier Bourgeois []
> Sent: Monday, March 29, 2010 2:45 AM
> To:
> Subject: Re: Wicket and JEE6
> Hi,
> Wicket has very good support in Weld, but to make it work I had to
> update
> the weld-integration.jar, otherwise the sample Numberguess application
> is
> looking for an unexisting method in the 1.0.0 Weld API : this is your
> problem.
> If you don't want to do it by hand like suggested by Iskandar, you can
> download one of the Glassfish nightly builds, this is what I have done.
> The
> latest builds are integrating Weld 1.0.1-final and the problem vanishes.
> If you want, I can provide you the maven profile to make the sample work
> nicely when you hit the "run" button in Netbeans, because there is
> another
> problem with the samples : the maven profile is not including the slf4j
> libraries, so there is an error in Glassfish when you run the sample. I
> assume this may be your next problem :)
> Also, you may run into trouble with the JPA2 code generation if you are
> using maven. But if you are using Eclipse annotation preprocessor to
> generate the metadata, you won't have the problem.
> --
> Olivier
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

Reply via email to