Hi,

wicket 1.4.x IPageFactory has a method:
<C extends Page> Page newPage(final Class<C> pageClass);

wicket 1.4.x IAuthorizationStrategy has a method:
<T extends Component> boolean isInstantiationAuthorized(Class<T> 
componentClass);

So, i was implementing IPageFactory.newPage(...)

and such action was correct:

public <C extends Page> Page newPage(final Class<C> pageClass) {
        if 
(!Session.get().getAuthorizationStrategy().isInstantiationAuthorized(pageClass)){ 
<-- everything is fine
        }
        ...
}

Now what we have in wicket 1.5:

IPageFactory has a method:
<C extends IRequestablePage> IRequestablePage newPage(final Class<C> pageClass);

IAuthorizationStrategy has a method:
<T extends Component> boolean isInstantiationAuthorized(Class<T> 
componentClass);

So, i am implementing IPageFactory.newPage(...)

and such implementation is not correct anymore:

public <C extends Page> Page newPage(final Class<C> pageClass) {
        if 
(!Session.get().getAuthorizationStrategy().isInstantiationAuthorized(pageClass)){ 
<-- this does not compile
        }
        ...
}

Bound mismatch: The generic method isInstantiationAuthorized(Class<T>) of type IAuthorizationStrategy is not applicable for the arguments (Class<C>). The inferred type C is not a valid substitute for the bounded parameter <T extends Component>


Does anybody know how to solve such issue?

Thanks;)

--
Regards,
Vytautas Racelis
-----------------------------------
phone:+370-600-34389
www.xaloon.org
www.allcarindex.com
www.leenle.com

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

Reply via email to