Thanks, update from trunk did help;)

On 10/22/2010 09:47 PM, Martin Grigorov wrote:
Update to r1026443 and should be better

On Fri, Oct 22, 2010 at 8:18 PM, Martin Grigorov<mgrigo...@apache.org>wrote:



On Fri, Oct 22, 2010 at 7:59 PM, Vytautas Racelis<turi...@gmail.com>wrote:

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?

I know :-)
We need to use IRequestableComponent instead.


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





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

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

Reply via email to