There's been some discussion on this in the past. The easiest way if AJAX is 
your only scenario is probably using request.isXHR(). An alternative is to 
maybe use the ComponentEventLinkEncoder either directly or by intercepting it. 
It knows whether the request is for a page or component event.

http://markmail.org/message/mug7wv5gueuw6hhj
http://markmail.org/message/gds72nly2vk5sqm3

Hope it helps,
Alfie.

-----Original Message-----
From: Juan Isern [mailto:juanis...@gmail.com] 
Sent: 14 April 2010 21:01
To: users@tapestry.apache.org
Subject: Good practices for handling page cleanup


Guys, I've been working with some ajax components that need, to work
properly, to store data in the session as persistent fields.

I thought onActivate() would be a nice place to clean things up, doing it at
the very first moment that a page is requested by the user seems ok.

The problem is that onActivate() gets invoked during ajax requests too. 

Is it any way to determine when a request comes from a user that's entered
an address or followed a link to that page, and make sure that request does
not come from ajax or an action link on it? I think that'd be my requirement

Thanks again, Juan
-- 
View this message in context: 
http://old.nabble.com/Good-practices-for-handling-page-cleanup-tp28247499p28247499.html
Sent from the Tapestry - User mailing list archive at Nabble.com.



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to