Did you migrate to wicket-cdi-1.1? To inject a non-managed class, use
NonContextual.of(MyClass.class).inject(instance). Components, however, are
injected by wicket-cdi itself. You should not need to inject those manually.

Best regards,
Emond
Op 4 apr. 2014 20:54 schreef "David Beer" <[email protected]>:

> Hi All
>
> I am in the process of moving my application to JavaEE7 and CDI 1.1. Things
> are going well all except for some CDI values. I have an @Stateless Session
> bean used for my DAO which I then Inject into various classes. The issue I
> have is that some of the classes don't get the reference Injected properly
> and give a NPE. With wicket CDI I was able to call
> CdiContainer.get().getNonContextualManager().inject(this); to Inject the
> reference properly.
>
> I know CDI 1.1 is different but I can't work out how to Inject the
> Component with Wicket CDI 1.1?
>
> Here is the code in my WicketApplication init():
>
>  new CdiConfiguration().setPropagation(NONE).configure(this);
>
> Thanks
>
> David
>

Reply via email to