Antwort: Trinidad 1.0.7 PPR after Timeout problem
Hi,
You might want to use the polling component
of Trinidad.
Best wishes
Wolfgang
Greetings,
I have recently upgraded an application from using Trinidad release 1.0.1
to 1.0.7.
Back in 1.0.1 I had to use a workaround for our TimeoutFilter to redirect
the user to the login page when a PPR request ocurred after the session
had timeout. Since that version still used iframes, it involved having
a page that tested to see if it was inside the iFrame, reset it's location,
and then redirect to the main login page, through "location.href=myLoginPage.jsf".
Now that the PPR mechanism uses "true" AJAX, is there a way to
redirect to a page after a timeout has been detected?
If I try to do a simple redirect in the filter, I get the javascript errors:
["Invalid PPR response. The response-headers were:\nCache-Control:
no-cache="set-cookie"\nDate: Tue, 06 ..."]
["Error ", TypeError: a5 has no properties message=a5 has no
properties, " delivering XML request status changed to ", function(...
since the javascript handling the response is expecting a <?Tr-XHR-Response-Type
?>, as far as I can tell.
Is there a standard mechanism to handle this situation, or any workaround
for sending a response that can be handled correctly by the PPR handling
mechanism and results in a redirect?
Thank you in advance,
Pedro
--
Os melhores cumprimentos,
Pedro Calção