On Wed, 31 Mar 2010 15:37:36 -0300, satb <[email protected]> wrote:

I am trying to get the component inside an advice and if the page invoked isextends "SecurePage", then I have to check the security credentials on that request.

A way better way of doing it is to implement a ComponentEventRequestFilter and contribute it to the service ComponentEventRequestHandler. Take a look at the graph in the end of http://tapestry.formos.com/nightly/tapestry5/guide/request.html to have a better look at how Tapestry processes requests.

A typical cross-cutting concern which is best served by an advice.

Advice is for services, not pages and components.

By the way, looking at your advice, there's the ComponentEventLinkEncoder service that provides methods like PageRenderRequestParameters decodePageRenderRequest(Request request) to deal with extracting the page name from a request.

--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor Owner, software architect and developer, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to