[Wicket-user] ApplicationSettings.setSigninPage moved?

2006-02-13 Thread Mark Derricutt
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 using IUnauthorizedComponentInstantiationListener 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 brainsi like my video games - i don't care what daddy said; they're my reality- henning pauly


Re: [Wicket-user] ApplicationSettings.setSigninPage moved?

2006-02-13 Thread Johan Compagner
yes it is removed and the replacement is: setUnauthorizedComponentInstantiationListener()see the library examplegetSecuritySettings().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 onreturn (((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 using IUnauthorizedComponentInstantiationListener 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 brainsi like my video games - i don't care what daddy said; they're my reality- henning pauly




Re: [Wicket-user] ApplicationSettings.setSigninPage moved?

2006-02-13 Thread Ingram Chen
hm... a little out of topic, but I am just getting confuse recentlyWhy a simple, common task like setSignInPage() becomes so complex ? I need to learn 4 class to accomplish :IUnauthorizedComponentInstantiationListener
RestartResponseAtInterceptPageExceptionUnauthorizedInstantiationExceptionSimplePageAuthorizationStrategyand 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.2On 2/14/06, Johan Compagner [EMAIL PROTECTED]
 wrote:yes it is removed and the replacement is: setUnauthorizedComponentInstantiationListener()
see the library examplegetSecuritySettings().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 onreturn (((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 using IUnauthorizedComponentInstantiationListener 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 brainsi like my video games - i don't care what daddy said; they're my reality- henning pauly



-- Ingram ChenJava [EMAIL PROTECTED]Institue of BioMedical Sciences Academia Sinica Taiwanblog: 
http://www.javaworld.com.tw/roller/page/ingramchen