You got through this time!

Look in the Vlib example included with Tapestry. In particular the class
net.sf.tapestry.vlib.Protected
The validate() method in Protected kicks off the kind of checking you are
looking for.

validate() is called by all the built-in services before the page is shown.
Basically, the services do this:

1. get the page: IPage myPage = cycle.getPage(somepage)
2. validate: myPage.validate() - an exception is thrown if the user isn;t
allowed to see the page
3. No exception in 2? then set the page: cycle.setPage(myPage)

So, you should be aware that if *you* need to call cycle.setPage(),  you
need call validate(), its not automatic.

Geoff

----- Original Message -----
From: "Lennart Benoot" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, December 12, 2002 9:28 AM
Subject: [Tapestry-developer] Web Application Platform


> Hey All,
>
> I am currently in the process of defining a web application platform to
> provide web services. We have chosen Tapestry as MVC layer. I have a few
> problems I haven't been able to resolve (at least not in an elegant way):
>
> 1) I want the whole application to be available only for logged in users.
> We have an existing framework for security. I think when a request comes
> in, the front controller servlet should check wether the user has logged
> in. If not, reroute the user to the login page. How do I do this in
tapestry?
>
> 2) Authorisation is also an important part of the web app platform. I
would
> like to call some java-code whenever a new page is loaded. This code
should
> check wether the user is allowed to access the page. If the user does not
> have the right permissions, he is rerouted to some other page. What would
> be a good way to do this?
>
> Thanks in advance,
> Lennart
>
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by:
> With Great Power, Comes Great Responsibility
> Learn to use your power at OSDN's High Performance Computing Channel
> http://hpc.devchannel.org/
> _______________________________________________
> Tapestry-developer mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/tapestry-developer
>



-------------------------------------------------------
This sf.net email is sponsored by:
With Great Power, Comes Great Responsibility 
Learn to use your power at OSDN's High Performance Computing Channel
http://hpc.devchannel.org/
_______________________________________________
Tapestry-developer mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/tapestry-developer

Reply via email to