If we don't add it then the behaviour of SimplePageAuthorizationStrategy is very strange if you ask me...
Why is there then a login page as constructor param. It is the whole point of that class to configure everything for you.

So you just should implement youre own sublcass of AbstractPageAuthorizationStrategy for this.
Or see why the application isn't there yet. So the wiring of spring should be done in the initalize phase of the application/wicket servlet.

johan


On 4/5/06, Mark Derricutt <[EMAIL PROTECTED]> wrote:
Hey all,

I finally got around to updating my local copy of wicket 1.2 to the latest subversion HEAD snapshots and notice a problem with SimplePageAuthorizationStrategy.

Looking at:

  http://papernapkin.org/pastebin/app/view/202

I see a default IUnauthorizedComponentInstantiationListener is added, however this is blindly using Application.get() which for me is null at the time I construct my AuthorisationStrategy due to wireing it up with Spring.

I can easily repeat the content of the SimplePageAuthorizationStrategy class in my own (theres not much code to SPAS itself), but if one could lower reuse it'd be good.

Easiest quick-fix is to check if Application.get () returns null before adding the default listener and if not, carry on without leaving me to assign the/my listener as normal.


--
i like my video games - mamma said they are gonna melt my brains
i like my video games - i don't care what daddy said; they're my reality
  - henning pauly

Reply via email to