Re: Passing Component or Class to IAuthorizationStrategy#isInstantiationAuthorized()

2013-12-20 Thread Sven Meier
SpringComponentInjector? Sven On 12/20/2013 10:09 AM, Carl-Eric Menzel wrote: I agree that something should be cleaned up. But like I said in the comment to that Jira ticket, I think it should in fact move more toward passing the class rather than the uninitialized instance. I like my objects

Re: Passing Component or Class to IAuthorizationStrategy#isInstantiationAuthorized()

2013-12-20 Thread Sven Meier
The reporter of the issue states that a call to isErrorPage() would be more elegant in that situation If the passed instance is not yet fully constructed, how can #isErrorPage() return anything useful other than static information? Isn't the class or any of its annotations sufficient in this

Re: Passing Component or Class to IAuthorizationStrategy#isInstantiationAuthorized()

2013-12-20 Thread Tom Götz
Well, how can you tell that a page is an error page if you only have it’s class in your hands? AFAIK you need to check wether: a) it’s a descendant of org.apache.wicket.markup.html.pages.AbstractErrorPage b) it’s a descendant of your own error page hierarchy, if any c) it is one of the classes

Re: Passing Component or Class to IAuthorizationStrategy#isInstantiationAuthorized()

2013-12-20 Thread Martin Grigorov
Oh. I was thinking only about the read part. One more +1 for the component! :) Martin Grigorov Wicket Training and Consulting On Fri, Dec 20, 2013 at 11:44 AM, Carl-Eric Menzel carl-e...@duesenklipper.de wrote: How can you inject dependencies into an instance's fields without actually

Re: Passing Component or Class to IAuthorizationStrategy#isInstantiationAuthorized()

2013-12-20 Thread Igor Vaynberg
this is a security check, so the whole idea is that it is ran before any of the user's code in the constructor which may have side-effects. eg a constructor marking a record as ready to be deleted because a delete panel was instantiated. the class itself should be enough. even if you get an

Re: Passing Component or Class to IAuthorizationStrategy#isInstantiationAuthorized()

2013-12-20 Thread Carl-Eric Menzel
Thanks Igor for making my point much better than I did. I agree 100%. Carl-Eric On Fri, 20 Dec 2013 08:14:27 -0800 Igor Vaynberg igor.vaynb...@gmail.com wrote: this is a security check, so the whole idea is that it is ran before any of the user's code in the constructor which may have

Re: Passing Component or Class to IAuthorizationStrategy#isInstantiationAuthorized()

2013-12-20 Thread Igor Vaynberg
i am guessing that the id of the component would be useful for logging in some cases, but i think it should just be passed in as an extra argument if thats the case. something to fix in 7.0... -igor On Fri, Dec 20, 2013 at 11:44 AM, Martin Grigorov mgrigo...@apache.org wrote: and what about