RE: LoginPage problem in T4

2006-10-18 Thread Denis Souza
Actually, that makes perfect sense. That's exactly how my Login page works.
I had thought about the recursive problem and had also created a way to
avoid this, but my method was buggy. Since you mentioned it I thought I
should check it out and I fixed it.

Thanks for your help!
Denis

-Original Message-
From: Ryan Holmes [mailto:[EMAIL PROTECTED] 
Sent: quarta-feira, 18 de outubro de 2006 01:50
To: Tapestry users
Subject: Re: LoginPage problem in T4

I'm not familiar with that exact error but if that pageValidate  
method is in your Login page (or it's superclass, etc.), then you're  
creating a sort of recursive condition where activating the Login  
page when the user is not logged in will redirect back to the Login  
page.

The Vlib app uses @Meta annotations to specifically mark the Login  
page as "anonymous" and the pageValidate() method is supposed to  
allow access in that case rather than redirect.

The above may be way off base since I can't see your superclass or  
more of your code...

-Ryan

On Oct 17, 2006, at 12:11 PM, Denis Souza wrote:

> Hi,
>
>
>
> I'm trying to implement a login page using VLib's mechanism so I  
> implemented
> PageValidationListener in my page's superclass with the following:
>
>
>
> public void pageValidate(PageEvent event) {
>
>if (!isUserLoggedIn()) {
>
>   LoginPage login = getLoginPage();
>
>   login.setCallback(new PageCallback(this));
>
>   throw new PageRedirectException(login);
>
>}
>
> }
>
>
>
> Very simple. Actually looks just like the VLib example, however I'm  
> getting
> the following exception before I get to the login page:
>
>
>
> A validate cycle during page activation was detected: LoginPage;  
> LoginPage.
>
>
>
> Anyone knows what it means and how to fix it?
>
>
>
> I even tried using the PageBeginRenderListener instead but what  
> happens is
> the PageRedirectException actually gets thrown! It's not caught by  
> tapestry
> and the page is not redirected. Any ideas?
>
>
>
> Thanks
>
> Denis
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: LoginPage problem in T4

2006-10-17 Thread Ryan Holmes
I'm not familiar with that exact error but if that pageValidate  
method is in your Login page (or it's superclass, etc.), then you're  
creating a sort of recursive condition where activating the Login  
page when the user is not logged in will redirect back to the Login  
page.


The Vlib app uses @Meta annotations to specifically mark the Login  
page as "anonymous" and the pageValidate() method is supposed to  
allow access in that case rather than redirect.


The above may be way off base since I can't see your superclass or  
more of your code...


-Ryan

On Oct 17, 2006, at 12:11 PM, Denis Souza wrote:


Hi,



I'm trying to implement a login page using VLib's mechanism so I  
implemented

PageValidationListener in my page's superclass with the following:



public void pageValidate(PageEvent event) {

   if (!isUserLoggedIn()) {

  LoginPage login = getLoginPage();

  login.setCallback(new PageCallback(this));

  throw new PageRedirectException(login);

   }

}



Very simple. Actually looks just like the VLib example, however I'm  
getting

the following exception before I get to the login page:



A validate cycle during page activation was detected: LoginPage;  
LoginPage.




Anyone knows what it means and how to fix it?



I even tried using the PageBeginRenderListener instead but what  
happens is
the PageRedirectException actually gets thrown! It's not caught by  
tapestry

and the page is not redirected. Any ideas?



Thanks

Denis




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



LoginPage problem in T4

2006-10-17 Thread Denis Souza
Hi,

 

I'm trying to implement a login page using VLib's mechanism so I implemented
PageValidationListener in my page's superclass with the following:

 

public void pageValidate(PageEvent event) {

   if (!isUserLoggedIn()) {

  LoginPage login = getLoginPage();

  login.setCallback(new PageCallback(this));

  throw new PageRedirectException(login);

   }

}

 

Very simple. Actually looks just like the VLib example, however I'm getting
the following exception before I get to the login page:

 

A validate cycle during page activation was detected: LoginPage; LoginPage.

 

Anyone knows what it means and how to fix it?

 

I even tried using the PageBeginRenderListener instead but what happens is
the PageRedirectException actually gets thrown! It's not caught by tapestry
and the page is not redirected. Any ideas?

 

Thanks

Denis