You can use: request.isXHR() which checks against a header "X-Requested-With" 
set by the prototype library for AJAX calls. If you write your own AJAX stuff 
then request.isXHR() probably won't be set so you will have to set it yourself.

Cheers
Peter


-- 
If you are not an intended recipient of this e-mail, please notify the sender, 
delete it and do not read, act upon, print, disclose, copy, retain or 
redistribute it. Please visit http://www.albourne.com/email.html for important 
additional terms relating to this e-mail.

----- Original Message -----
From: "Franz Amador" <[EMAIL PROTECTED]>
To: users@tapestry.apache.org
Sent: Tuesday, 9 December, 2008 9:10:14 PM GMT +02:00 Athens, Beirut, 
Bucharest, Istanbul
Subject: How can my RequestExceptionHandler distinguish event requests from 
page requests?


My app responds to Ajax event requests with JSON.  If the event handler
throws an exception, I'd like to return a special JSON response with the
error text.  Can I decorate RequestExceptionHandler for this?  To do so, I'd
need to be able to tell that the request is an Ajax event request; if it
isn't, I'll delegate to the default RequestExceptionHandler.  Is there a
service I can use in my RequestExceptionHandler that'll tell me whether the
request is an event request and not, say, a page request?
-- 
View this message in context: 
http://n2.nabble.com/How-can-my-RequestExceptionHandler-distinguish-event-requests-from-page-requests--tp1635333p1635333.html
Sent from the Tapestry Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to