Why a simple, common task like setSignInPage() becomes so complex ?
I need to learn 4 class to accomplish :
IUnauthorizedComponentInstantiationListener
RestartResponseAtInterceptPageException
UnauthorizedInstantiationException
SimplePageAuthorizationStrategyUnauthorizedInstantiationException
and the name of class and method are long and complex !
Should'nt Wicket provide simplifed default implemention out of box ?
....I am *afraid* upgrading to wicket 1.2....
On 2/14/06, Johan Compagner <[EMAIL PROTECTED]
> wrote:
yes it is removed and the replacement is: setUnauthorizedComponentInstantiationListener()
see the library example
getSecuritySettings().setUnauthorizedComponentInstantiationListener(new IUnauthorizedComponentInstantiationListener()
{
public void onUnauthorizedInstantiation(final Component component)
{
// If there is a sign in page class declared, and the unauthorized
// component is a page, but it's not the sign in page
if (component instanceof Page)
{
// Redirect to intercept page to let the user sign in
throw new RestartResponseAtInterceptPageException( SignIn.class);
}
else
{
// The component was not a page, so throw an exception
throw new UnauthorizedInstantiationException( component.getClass());
}
}
});
// Create a simple authorization strategy, that checks all pages of type
// Authenticated web page.
SimplePageAuthorizationStrategy authorizationStrategy = new SimplePageAuthorizationStrategy(
AuthenticatedWebPage.class)
{
protected boolean isAuthorized()
{
// check whether the user is logged on
return (((LibrarySession)Session.get()).isSignedIn());
}
};On 2/13/06, Mark Derricutt < [EMAIL PROTECTED]> wrote:Hey all,
Where abouts has ApplicationSettings.setSigninPage moved to/changed to? Just pulled out a new HEAD build and its no longer there, and no sign of it on any other class.
http://papernapkin.org/pastebin/app/view/236 shows usingIUnauthorizedComponentInstantiationListener
which I havn't seen before, but also mentions setSigninPage on securitySettings (which it doesn't appear to exist, at least not on sourceforge's anonymous cvs HEAD).
Cheers,
Mark
--
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
--
Ingram Chen
Java [EMAIL PROTECTED]
Institue of BioMedical Sciences Academia Sinica Taiwan
blog: http://www.javaworld.com.tw/roller/page/ingramchen