Am 18.05.2010 23:40, schrieb Christoph Grün:

I am using Wicket 1.4.8 with Guice 1.0 and Warp Persist/Hibernate.
When injecting DAOs directly into Wicket components, it works fine (I inject
the DAO Interface). However, I would like to inject them, next to other
objects, also in classes that do some business logic. Those classes are
themselves injected in Wicket pages.

we use a helper class with

    public static void injectMembers(final Object o)
    {
        Application application = Application.get();
        Assert.isNotNull(application, "Application is not attached");
        Injector injector = getInjector(application);

        new GuiceComponentInjector(application, injector).inject(o);

    }

to inject into arbritary objects that end up in wicket space.

cu uwe

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to