I have seen the #1 behavior as well. Bummer.
These problems all stem from the fact the the template method for render
(out in requestCycle if my memory serves me) is relying on page renderings
to manage themselves...so once that outer page render is started the
security check is over! This is an area for improvement. (I am not looking
at the code as I say this, so maybe I'm forgetting something).
Once the wiki gets set up, we can keep track of these "areas" that need
work (since they require discussion).
Workaround is to check in beginResponse (check isRewinding to avoid
multiple checks I think).
-C
|--------+---------------------------------------------->
| | "Tom Davies" |
| | <[EMAIL PROTECTED]> |
| | Sent by: |
| | [EMAIL PROTECTED]|
| | eforge.net |
| | |
| | |
| | 04/29/2002 07:03 AM |
| | |
|--------+---------------------------------------------->
>-----------------------------------------------------------------------------------------------------------|
|
|
| To: <[EMAIL PROTECTED]>
|
| cc:
|
| Subject: [Tapestry-developer] when does validate get called?
|
>-----------------------------------------------------------------------------------------------------------|
1. When I throw a PageRedirectException to my login page, validate on the
login page isn't called before it is displayed. Is this right? validate()
does get called when I submit the form on the page (is this as the page
rewinds?)
2. When my login page executes the code:
cycle.setPage("LoginSuccess");
LoginSuccess p = (LoginSuccess)cycle.getPage();
in its form listener method, the LoginSuccess page is displayed without
validate() being called first. Is that right?
3. When I use a Page component to go to another page, validate doesn't get
called when the destination page is rendered. Is this right?
Is validate() the wrong place to be doing security checks that a page
should
be visible?
Thanks,
Tom
_______________________________________________
Tapestry-developer mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/tapestry-developer
_______________________________________________
Tapestry-developer mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/tapestry-developer