You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by bmg125 <br...@reged.com> on 2009/01/02 17:18:51 UTC
[T5] Request Management
I am running into a problem trying to determine when a conversation starts
and more specifically ends with Tapestry. I understand that Tapestry issues
some redirects or creates a new request(s) for the render cycle. Is there a
way to determine when a conversation is completed and the page has been
rendered?
Right now, I have a Servlet Filter that puts an attribute into the
HttpSession. I want to clean that attribute up when the conversation is
over and tapestry is done with all of its requests/redirects/rendering.
I have looked at contributing a requestHandler but it seems to be called on
both the action and render requests. I looked at contributing a Master
Dispatcher, but I don't think that is what I want to do, so I didn't pursue
it too far.
Any ideas?
--
View this message in context: http://www.nabble.com/-T5--Request-Management-tp21253367p21253367.html
Sent from the Tapestry - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: [T5] Request Management
Posted by Francois Armand <fa...@linagora.com>.
bmg125 wrote:
> Okay, so I tried contributing a MasterDispatcher. I contributed it with an
> order of after:PageRender, however it doesn't seem to be getting called. It
> seems that PageRenderDispatcher is interrupting the pipeline, so
> contributing a dispatcher after:PageRender isn't possible.
>
> Anyone know of a work around for this since? The PageRenderDispatcher is
> internal to T5 and I would like to keep my hands out of it. :)
>
For the posterity: it seems to have been solved by contributing to
PageRenderRequestHandler :
def buildMyFilter(request:Request): PageRenderRequestFilter = {
new PageRenderRequestFilter() {
override def
handle(parameters:PageRenderRequestParameters,
handler:PageRenderRequestHandler) {
//do business before page render, for
example set a var in request:
//request.setAttribute("foo", "bar");
handler.handle(parameters);
//do business after page render, for
example read the var:
//println("After render: " +
request.getAttribute("foo"));
}
};
}
def
contributePageRenderRequestHandler(configuration:OrderedConfiguration[PageRenderRequestFilter],
myFilter:PageRenderRequestFilter) {
configuration.add("myFilter", myFilter, "after:*");
}
--
Francois Armand
Etudes & Développements J2EE
Groupe Linagora - http://www.linagora.com
Tél.: +33 (0)1 58 18 68 28
-----------
http://fanf42.blogspot.com
InterLDAP - http://interldap.org
FederID - http://www.federid.org/
Open Source identities management and federation
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: [T5] Request Management
Posted by bmg125 <br...@reged.com>.
Okay, so I tried contributing a MasterDispatcher. I contributed it with an
order of after:PageRender, however it doesn't seem to be getting called. It
seems that PageRenderDispatcher is interrupting the pipeline, so
contributing a dispatcher after:PageRender isn't possible.
Anyone know of a work around for this since? The PageRenderDispatcher is
internal to T5 and I would like to keep my hands out of it. :)
--
View this message in context: http://www.nabble.com/-T5--Request-Management-tp21253367p21254525.html
Sent from the Tapestry - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org