Hello,

  I tried to @Inject a Class<? extends Page> in a home page and I got
an exception about the lazy proxy. As I could see in the stack trace,
wicket-guice is trying to create a proxy to the attribute that I
@Inject and the cglib tries to extend Class<? extends Page> class
without a success. To avoid this problem I @Inject a provider. Who is
in charge of the wicket-guice project? Is there a better way to avoid
this problem?

Below part of the source code:

---- WicketPage.java ----
public class WicketPage extends TypeLiteral<Class<? extends Page>> {
}
---- cut here ----

---- MyOwnGuiceModule.java ----
bind(new WicketPage()).annotatedWith(
        Names.named("SignOutPage.redirectTo").toInstance(
        SignOutPage.class);
---- cut here ----

---- SignOutPage.java ----
@Inject
@Named("SignOutPage.redirectTo")
private Class<? extends Page> redirectTo;
---- cut here ----

Thanks,
Eduardo S. Nunes

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

Reply via email to